Jack stays in a n-storey hostel. His dorm room is on the jth floor. Every morning, he is in so much hurry for classes that he cannot not decide whether to take Lift or Stairs to reach ground-floor. He asks you to help him choose either Stairs or Lift based on total time taken to reach ground-floor.
It takes him 10 seconds to get down by 1 floor using Stairs.
The lift works as follows:
If the lift is at the ith floor, it take 5 second to reach the (i-1) or (i+1) floor.
The lift may stop at a floor to pick up persons or to drop off persons or to change the direction. If the lift stops at a floor due to one/more of these reasons, it takes 10 seconds extra at that floor.
It changes its direction only at the ground floor(0th floor) or top floor(nth floor).
Assume that nobody else is using the lift other than Jack.
Input:
First line contains T - number of test cases.
Each of next T lines contains three integers n, J and L and a character either 'U' or 'D' (without quotes) where J indicates the number of the floor Jack is present at the moment, L indicates the number of floor Lift is present at the moment and 'U' or 'D' represents whether Lift is moving Up or Down.
Output:
Print in T lines containing 'Stairs' or 'Lift'(without quotes) followed by the minimum amount of time it would take Jack to reach the ground floor. If time taken by both the ways is same, Jack would obviously prefer the Lift.
Constraints:
1<=n<=100
1<=J<=n
0<=L<=n
Jack is on the 10th floor. So it takes him 1010=100 seconds to reach the ground floor by stairs. The lift is on the 20th floor. As it is going up right now, it will first go to the top floor( i.e. the 30th floor)(105 seconds) + change its direction(10 seconds) + come down to 10th floor(205 seconds) + pick up Jack(10 seconds) + reach the ground floor(105 seconds) + drop Jack ( 10 seconds) ; time = (30-20)5+10+305+10 +10 = 50+10+150+20=230 seconds.
Time to reach ground floor by stairs=1010=100 seconds. Here, the lift and Jack are on the same floor (i.e. the top floor). Time to reach ground floor by lift = time to change directions(10 seconds) + time to reach ground floor(105 seconds) + time to drop Jack(10 seconds)=10 + 510+10=70 seconds. * When Jack is on the top floor, there is no need to consider separately the time for Jack to climb on the lift. As he will climb when the lift stops to change directions