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

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

min_cost = 1001

for path in path_list:

	if T >= path[1] and path[0] < min_cost:

		min_cost = path[0]

print((min_cost if min_cost < 1001 else 'TLE'))
n, t = list(map(int, input().split()))

ct = list([x for x in [list(map(int, input().split())) for i in range(n)] if x[1] <= t])

print(("TLE" if len(ct) == 0 else min(ct)[0]))

N, T = list(map(int, input().split()))
path_list = [list(map(int, input().split())) for _ in range(N)]
min_cost = 1001
for path in path_list:
    if T >= path[1] and path[0] < min_cost:
        min_cost = path[0]
print((min_cost if min_cost < 1001 else "TLE"))

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

-N, T = list(map(int, input().split())) -path_list = [list(map(int, input().split())) for _ in range(N)] -min_cost = 1001 -for path in path_list: -    if T >= path[1] and path[0] < min_cost: -        min_cost = path[0] -print((min_cost if min_cost < 1001 else "TLE")) +n, t = list(map(int, input().split())) +ct = list([x for x in [list(map(int, input().split())) for i in range(n)] if x[1] <= t]) +print(("TLE" if len(ct) == 0 else min(ct)[0]))