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



c = []

t = []

for _ in range(N):

    _c, _t = list(map(int, input().split()))



    if _t <= T:

        c.append(_c)

        t.append(_t)



if len(c) == 0:

    print('TLE')

else:

    print((min(c)))

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



min_c = 1001



for _ in range(N):

    _c, _t = list(map(int, input().split()))



    if _t <= T:

        min_c = min(min_c, _c)



if min_c == 1001:

    print('TLE')

else:

    print(min_c)

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

N, T = list(map(int, input().split()))
min_c = 1001
for _ in range(N):
    _c, _t = list(map(int, input().split()))
    if _t <= T:
        min_c = min(min_c, _c)
if min_c == 1001:
    print("TLE")
else:
    print(min_c)

-c = [] -t = [] +min_c = 1001 -        c.append(_c) -        t.append(_t) -if len(c) == 0: +        min_c = min(min_c, _c) +if min_c == 1001: -    print((min(c))) +    print(min_c)