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

y = 10**5

for i in range(n):

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

    if x<=t:

        y=min(y,c)

if y != 10**5:

    print(y)

else:

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

y = 10**5

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

for i in range(n):

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

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

if y != 10**5:

    print(y)

else:

    print("TLE")
n, t = list(map(int, input().split()))
y = 10**5
for i in range(n):
    c, x = list(map(int, input().split()))
    if x <= t:
        y = min(y, c)
if y != 10**5:
    print(y)
else:
    print("TLE")

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

+c = [list(map(int, input().split())) for i in range(n)] -    c, x = list(map(int, input().split())) -    if x <= t: -        y = min(y, c) +    if c[i][1] <= t: +        y = min(y, c[i][0])