n,t=input().split()

n,t=int(n),int(t)



c=1001

for i in range(n):

    ck,tk=input().split()

    if int(tk)<=t and int(ck)<c:

        c=int(ck)

        

if c==1001:

    print("TLE")

else:

    print(c)

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

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

c=10000000000000000

for i in range(n):

    if ct[i][1]<=t:

        c=min(c,ct[i][0])

print((c if c!=10000000000000000 else "TLE"))
n, t = input().split()
n, t = int(n), int(t)
c = 1001
for i in range(n):
    ck, tk = input().split()
    if int(tk) <= t and int(ck) < c:
        c = int(ck)
if c == 1001:
    print("TLE")
else:
    print(c)

n, t = list(map(int, input().split()))
ct = [list(map(int, input().split())) for i in range(n)]
c = 10000000000000000
for i in range(n):
    if ct[i][1] <= t:
        c = min(c, ct[i][0])
print((c if c != 10000000000000000 else "TLE"))

-n, t = input().split() -n, t = int(n), int(t) -c = 1001 +n, t = list(map(int, input().split())) +ct = [list(map(int, input().split())) for i in range(n)] +c = 10000000000000000 -    ck, tk = input().split() -    if int(tk) <= t and int(ck) < c: -        c = int(ck) -if c == 1001: -    print("TLE") -else: -    print(c) +    if ct[i][1] <= t: +        c = min(c, ct[i][0]) +print((c if c != 10000000000000000 else "TLE"))