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

c = [0]*N

t = [0]*N

for i in range(N):

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

min_cost = 1001

for i in range(N):

    if t[i]<=T:

        min_cost = min(c[i],min_cost)

if min_cost == 1001:

    print("TLE")

else:

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

c = [0]*N

t = [0]*N

cost = 1001

for i in range(N):

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

    if t[i]<=T:

        cost  = min(cost,c[i])

if cost == 1001:

    print("TLE")

else:

    print(cost)
N, T = list(map(int, input().split()))
c = [0] * N
t = [0] * N
for i in range(N):
    c[i], t[i] = list(map(int, input().split()))
min_cost = 1001
for i in range(N):
    if t[i] <= T:
        min_cost = min(c[i], min_cost)
if min_cost == 1001:
    print("TLE")
else:
    print(min_cost)

N, T = list(map(int, input().split()))
c = [0] * N
t = [0] * N
cost = 1001
for i in range(N):
    c[i], t[i] = list(map(int, input().split()))
    if t[i] <= T:
        cost = min(cost, c[i])
if cost == 1001:
    print("TLE")
else:
    print(cost)

+cost = 1001 -min_cost = 1001 -for i in range(N): -        min_cost = min(c[i], min_cost) -if min_cost == 1001: +        cost = min(cost, c[i]) +if cost == 1001: -    print(min_cost) +    print(cost)