i=lambda:list(map(int,input().split()));N,T=i();a=min([2000]+[c for c,t in[i()for _ in[0]*N]if t<=T]);print(('TLE'*(a>1000)or a))
i=lambda:list(map(int,input().split()));N,T=i();print((min([c for c,t in eval('i(),'*N)if t<=T],default='TLE')))
i = lambda: list(map(int, input().split()))
N, T = i()
a = min([2000] + [c for c, t in [i() for _ in [0] * N] if t <= T])
print(("TLE" * (a > 1000) or a))

i = lambda: list(map(int, input().split()))
N, T = i()
print((min([c for c, t in eval("i()," * N) if t <= T], default="TLE")))

-a = min([2000] + [c for c, t in [i() for _ in [0] * N] if t <= T]) -print(("TLE" * (a > 1000) or a)) +print((min([c for c, t in eval("i()," * N) if t <= T], default="TLE")))