Anurag is posed with a very serious problem. He will be in London during the summers from days [ a,b ] for an internship. But he also wants to attend the ACM-ICPC World Finals with his team to be held in Thailand during [ c,d ] days. The opening ceremony for the World Finals will be held on c day. He found out that it would take him S time (in days) to travel from London to Thailand. He wonders what is the maximum time L in the interval [ a,b ], at which he will have to leave so as to reach Thailand on or before the opening ceremony. 
If it is not possible for him to reach on or before the opening ceremony, print STAY IN LONDON.

Input

 The first line contains a single integer T, denoting the number of test cases.
 Next T lines contain five integers each a b c d and S.
Output

For each test case, you need to output the answer in a new line.

Constraints

 1 ≤ T ≤ 100000
 1 ≤ a ≤ b ≤ 100000
 b ≤ c ≤ d ≤ 100000
 1 ≤ S ≤ 100000

SAMPLE INPUT
2
1 14 15 20 2
13 14 15 20 3

SAMPLE OUTPUT
13
STAY IN LONDON
T = int(raw_input())
for _ in xrange(T):
	a, b, c, d, s = map(int, raw_input().split())
	res = c - s
	if res > b:
		print b
		continue
	print res if res >= a and res <= c else "STAY IN LONDON"