N, T = list(map(int, input().split()))

C = []

for _ in range(N):

	c, t = list(map(int, input().split()))

	if t <= T:

		C.append(c)

if C == []:

	print("TLE")

else:

	print((min(C)))

N, T = list(map(int, input().split()))

ct = [list(map(int, input().split())) for _ in range(N)]

cti = [i for i in ct if i[1] <= T]



if len(cti) == 0:

    print("TLE")

else:

    print((min(cti)[0]))

N, T = list(map(int, input().split()))
C = []
for _ in range(N):
    c, t = list(map(int, input().split()))
    if t <= T:
        C.append(c)
if C == []:
    print("TLE")
else:
    print((min(C)))

N, T = list(map(int, input().split()))
ct = [list(map(int, input().split())) for _ in range(N)]
cti = [i for i in ct if i[1] <= T]
if len(cti) == 0:
    print("TLE")
else:
    print((min(cti)[0]))

-C = [] -for _ in range(N): -    c, t = list(map(int, input().split())) -    if t <= T: -        C.append(c) -if C == []: +ct = [list(map(int, input().split())) for _ in range(N)] +cti = [i for i in ct if i[1] <= T] +if len(cti) == 0: -    print((min(C))) +    print((min(cti)[0]))