Read problem statements in [Mandarin], [Bengali], [Russian], and [Vietnamese] as well.

Chef has taken his first dose of vaccine D days ago. He may take the second dose no less than L days and no more than R days since his first dose.

Determine if Chef is too early, too late, or in the correct range for taking his second dose.

------ Input Format ------ 

- First line will contain T, number of testcases. Then the testcases follow.
- Each testcase contains of a single line of input, three integers D, L, R.

------ Output Format ------ 

For each test case, print a single line containing one string - "Too Early" (without quotes) if it's too early to take the vaccine, "Too Late" (without quotes) if it's too late to take the vaccine, "Take second dose now" (without quotes) if it's the correct time to take the vaccine.

------ Constraints ------ 

$1 ≤ T ≤ 10^{5}$
$1 ≤ D ≤ 10^{9}$
$1 ≤ L ≤ R ≤ 10^{9}$

------ subtasks ------ 

Subtask 1 (100 points): Original constraints

----- Sample Input 1 ------ 
4
10 8 12 
14 2 10
4444 5555 6666 
8 8 12

----- Sample Output 1 ------ 
Take second dose now
Too Late
Too Early
Take second dose now
----- explanation 1 ------ 
Test case $1$: The second dose needs to be taken within $8$ to $12$ days and since the Day $10$ lies in this range, we can take the second dose now.

Test case $2$: The second dose needs to be taken within $2$ to $10$ days since Day $14$ lies after this range, it is too late now. 

Test case $3$: The second dose needs to be taken within $5555$ to $6666$ days and since the Day $4444$ lies prior to this range, it is too early now.

Difficulty: EASY
Tags: Mathematics

Ad-hoc

Starter code:

Solutions:
t = int(input())
for i in range(t):
	(d, l, r) = map(int, input().split())
	if l <= d and r >= d:
		print('Take second dose now')
	elif l >= d:
		print('Too Early')
	else:
		print('Too Late')


T = int(input())
for i in range(T):
	(D, L, R) = map(int, input().split())
	if D >= L and D <= R:
		print('Take second dose now')
	elif D > R:
		print('Too Late')
	else:
		print('Too Early')


for i in range(int(input())):
	x = list(map(int, input().split()))
	c = x[0]
	if x[1] <= c <= x[2]:
		print('Take second dose now')
	elif c < x[1]:
		print('Too Early')
	else:
		print('Too Late')


for tescases in range(int(input())):
	(first, l, r) = map(int, input().split())
	if first > l and first > r:
		print('Too Late')
	elif first >= l and first <= r:
		print('Take second dose now')
	else:
		print('Too Early')


from math import gcd
t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	if a >= b and a <= c:
		print('Take second dose now')
	elif a < b:
		print('Too Early')
	else:
		print('Too Late')


for _ in range(int(input())):
	(a, b, c) = map(int, input().split())
	if a >= b and a <= c:
		print('Take second dose now')
	elif a <= b:
		print('Too Early')
	else:
		print('Too Late')


r = int(input())
for i in range(r):
	(x, y, z) = map(int, input().split())
	if x in range(y, z + 1):
		print('Take second dose now')
	elif x < y:
		print('Too Early')
	elif x > z:
		print('Too Late')


n = int(input())
for i in range(n):
	(a, b, c) = list(map(int, input().split()))
	if b <= a <= c:
		print('Take second dose now')
	elif a < b:
		print('Too Early')
	else:
		print('Too Late')


n = int(input())
for i in range(n):
	(x, y, z) = map(int, input().split())
	if x >= y and x <= z:
		print('Take second dose now')
	else:
		if x > z:
			print('Too Late')
		if x < y:
			print('Too Early')


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	if a >= b and a <= c:
		print('Take second dose now')
	elif a > c:
		print('Too Late')
	elif a < b:
		print('Too Early')


for _ in range(int(input())):
	(d, l, r) = map(int, input().split())
	if d > r:
		print('Too Late')
	elif d < l:
		print('Too Early')
	elif d >= l and d <= r:
		print('Take second dose now')


t = int(input())
for tc in range(t):
	(a, b, c) = map(int, input().split())
	if a < b:
		print('Too Early')
	elif a > c:
		print('Too Late')
	elif a >= b or a <= c:
		print('Take second dose now')


for i in range(int(input())):
	(m, o, r) = map(int, input().split())
	if o <= m and r >= m:
		print('Take second dose now')
	elif o >= m:
		print('Too Early')
	else:
		print('Too Late')


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x >= y and x <= z:
		print('Take second dose now')
	elif x > y and x > z:
		print('Too Late')
	else:
		print('Too Early')


T = int(input())
for _ in range(T):
	(D, L, R) = map(int, input().split())
	if D in range(L, R + 1):
		print('Take second dose now')
	elif D <= L:
		print('Too Early')
	else:
		print('Too Late')


t = int(input())
i = 1
while i <= t:
	i += 1
	(d, l, r) = map(int, input().split())
	if d < l:
		print('Too Early')
	elif d > r:
		print('Too Late')
	else:
		print('Take second dose now')


t = int(input())
for q in range(t):
	(d, l, r) = map(int, input().split())
	if d < l:
		print('Too Early')
		continue
	elif d > r:
		print('Too Late')
		continue
	elif d >= l or d <= r:
		print('Take second dose now')
		continue


n = int(input())
while n > 0:
	(a, b, c) = map(int, input().split())
	if a >= b and a <= c:
		print('Take second dose now')
	elif a > c:
		print('Too Late')
	elif a < b:
		print('Too Early')
	n = n - 1


for i in range(int(input())):
	(Days, L, R) = map(int, input().split())
	if Days >= L and Days <= R:
		print('Take second dose now')
	elif Days < L:
		print('Too Early')
	elif Days > R:
		print('Too Late')


for j in range(int(input())):
	(d, l, r) = map(int, input().split())
	if d in range(l, r + 1):
		print('Take second dose now')
	elif d not in range(l, r + 1) and d < l:
		print('Too Early')
	else:
		print('Too Late')


for i in range(int(input())):
	(mati, onci, r) = map(int, input().split())
	if onci <= mati and r >= mati:
		print('Take second dose now')
	elif onci >= mati:
		print('Too Early')
	else:
		print('Too Late')


N = int(input())
while N > 0:
	(d, l, r) = map(int, input().split())
	if d >= l and d <= r:
		print('Take second dose now')
	elif d > r:
		print('Too Late')
	else:
		print('Too Early')
	N = N - 1


for _ in range(int(input())):
	(d, l, r) = [int(a) for a in input().split()]
	if d > r:
		print('Too Late')
	elif d < l:
		print('Too Early')
	else:
		print('Take second dose now')


try:
	t = int(input())
	for r in range(t):
		(a, b, c) = map(int, input().split())
		if a >= b and a <= c:
			print('Take second dose now')
		elif a > c:
			print('Too Late')
		elif a < b:
			print('Too Early')
except:
	pass


for i in range(int(input())):
	(ago, no_less, no_more) = map(int, input().split())
	print('Too Early' if no_less > ago else 'Too Late' if ago > no_more else 'Take second dose now')


for i in range(int(input())):
	(x, y, a) = map(int, input().split())
	if x < y:
		print('Too Early')
	elif x > a:
		print('Too Late')
	else:
		print('Take second dose now')