Problem:
 Score : 200 points    Problem Statement When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i -th of these routes, he will get home in time t_i at cost c_i .  Find the smallest cost of a route that takes not longer than time T .      Constraints  All values in input are integers.  1 \leq N \leq 100  1 \leq T \leq 1000  1 \leq c_i \leq 1000  1 \leq t_i \leq 1000  The pairs (c_i, t_i) are distinct.         Input Input is given from Standard Input in the following format:  N  T  c_1  t_1  c_2  t_2  :  c_N  t_N       Output Print the smallest cost of a route that takes not longer than time T .  If there is no route that takes not longer than time T , print TLE instead.        Sample Input 1 3 70
7 60
1 80
4 50      Sample Output 1 4   The first route gets him home at cost 7 .  The second route takes longer than time T = 70 .  The third route gets him home at cost 4 .   Thus, the cost 4 of the third route is the minimum.       Sample Input 2 4 3
1 1000
2 4
3 1000
4 500      Sample Output 2 TLE  There is no route that takes not longer than time T = 3 .       Sample Input 3 5 9
25 8
5 9
4 10
1000 1000
6 1      Sample Output 3 5

Solution (Python):






c=[]
n,T=[int(i) for i in input().split()]

for _ in range(n):
    c0,t0=[int(i) for i in input().split()]
    if t0 <= T:
        c.append(c0)

if len(c)==0:
    print("TLE")
else:
    print(min(c))

Solution (Python):
N, T = map(int, input().split())
res = 2e9

for i in range(N):
    c, t = map(int, input().split())
    if t <= T:
        res = min(res, c)

if res == 2e9:
    print('TLE')
else:
    print(res)

Solution (Python):
N, T = map( int, input().split())
ans = 10**5
for _ in range(N):
    c, t = map( int, input().split())
    if t <= T:
        ans = min( ans, c)
if ans == 10**5:
    print('TLE')
else:
    print(ans)

Solution (Python):
n, t = map(int, input().split())
min_c = 10000
for i in range(n):
    c, tt = map(int, input().split())
    if tt <= t:
        min_c = min(min_c, c)
if min_c < 10000:
    print(min_c)
else:
    print('TLE')

Solution (Python):
n,t = map(int,input().split())
d = 1000000
for i in range(n):
  c,a = map(int,input().split())
  if(c <= d and a <= t):
    d = c
if(d == 1000000):
  print("TLE")
else:
  print(d)

Solution (Python):
n, T = map(int, raw_input().split())

ans = 9999999999999999999999999999999999999999999999999999999999999999999999999999
for i in xrange(n):
    c, t = map(int, raw_input().split())
    if t <= T:
        ans = min(ans, c)
if ans > 999999999999999999999999999999999999999999999999999999999999999:
    print "TLE"
else:
    print ans

Solution (Python):
n, tt = list(map(int, input().split()))
cs = []

for i in range(n):
    c, t = list(map(int, input().split()))
    if t <= tt:
        cs.append(c)

if cs:
    print(min(cs))
else:
    print("TLE")

Solution (Python):
N, T = [int(_) for _ in input().split()]

result = 1010

for i in range(N):
    c, t = [int(_) for _ in input().split()]
    if t <= T:
        result = min(c, result)

if result == 1010:
    print("TLE")
else:
    print(result)

Solution (Python):
def inpl(): return list(map(int, input().split()))

N, T = inpl()
ans = 10**9
for _ in range(N):
    c, t = inpl()
    if t <= T:
        ans = min(ans, c)

if ans == 10**9:
    print("TLE")
else:
    print(ans)

Solution (Python):
N, T = map(int, input().split())

ans = float('inf')
for _ in range(N):
    c, t = map(int, input().split())
    if t <= T:
        ans = min(ans, c)
print(ans if ans != float('inf') else 'TLE')

Solution (Python):
n, t = map(int, input().split())
array = [[int(x) for x in input().split()] for x in range(n)]

res = float("inf")
for i in array:
    if i[1] <= t:
        res = min(res, i[0])
print(res if res != float("inf") else "TLE")

Solution (Python):
ai = lambda: list(map(int,input().split()))
ai_ = lambda: [int(x)-1 for x in input().split()]

n,T = ai()
ans = 10**5
for _ in range(n):
    c,t = ai()
    if t <= T:
        ans = min(c,ans)
if ans == 10**5:
    print('TLE')
else:
    print(ans)

Solution (Python):
N, T = map(int, input().split())

minc = 1001
for _ in range(N):
    c, t = map(int, input().split())
    if t <= T:
        minc = min(minc, c)

if minc == 1001:
    print("TLE")
else:
    print(minc)

Solution (Python):
N, T = map(int, input().split())
ct = [list(map(int, input().split())) for i in range(N)]
ans = 10000000
for i in ct:
    if i[1] <= T:
        ans = min(i[0], ans)
if ans == 10000000:
    ans = "TLE"
print(ans)

Solution (Python):
n, t = [int(i) for i in input().split()]
C = [[int(i) for i in input().split()] for j in range(n)]

C.sort()

for c, s in C:
    if s <= t:
        print(c)
        exit()

print('TLE')

Solution (Python):
N,T=list(map(int, input().strip().split()))
m=999999
for i in range(N):
    c,t=list(map(int, input().strip().split()))
    if t<=T:
        if m>c:
            m=c
if m>1000:
    print("TLE")
else:
    print(m)

Solution (Python):
n, t = map(int, input().split())
c = 10000
for i in range(n):
    a, b = map(int, input().split())
    if t >= b and c > a:
        c = a
if c == 10000:
    print("TLE")
else:
    print(c)

Solution (Python):
n,x = (int(i) for i in input().split())
ans = 1001
for _ in range(n):
	c,t = (int(i) for i in input().split())
	if t<=x: ans = min(ans,c)
if ans-1001: print(ans)
else: print("TLE")

Solution (Python):
N, T = map(int, input().split())
num = float("inf")
for i in range(N):
    c, t = map(int, input().split())
    if t <= T:
        num = min(num, c)

if num == float("inf"):
    print("TLE")
else:
    print(num)

Solution (Python):
n,t = map(int, input().split())
list_ct = []
c_min = 10000000
for i in range(n):
    list_ct.append(list(map(int, input().split())))
for i in range(n):
    if list_ct[i][1] <= t:
        if c_min > list_ct[i][0]:
            c_min = list_ct[i][0]

if c_min == 10000000:
    print("TLE")
else:
    print(c_min)

Solution (Python):
n,t = map(int,input().split())
ass = []
for i in range(n):
    x,y = map(int,input().split())
    if y <= t:
        ass.append(x)
if len(ass)>=1:
    print(min(ass))
else:
    print('TLE')

Solution (Python):
N, T = map(int, input().split())
ans = float('inf')
for i in range(N):
    c, t = map(int, input().split())
    if t <= T:
        ans = min(c, ans)
if ans == float('inf'):
    print('TLE')
else:
    print(ans)

Solution (Python):
N,T = map(int,input().split())
ans = 10000
for _ in range(N):
    c,t = map(int,input().split())
    if t <= T:
        ans = min(ans,c)
if ans != 10000:
    print(ans)
else:
    print("TLE")

Solution (Python):
N, T = [int(i) for i in input().split()]
Cost = [[int(i) for i in input().split()] for j in range(N)]
tmp = []
for c, t in Cost:
    if t <= T:
        tmp.append(c)
ans = 'TLE' if len(tmp) == 0 else min(tmp)
print(ans)

Solution (Python):





N,T = [int(i) for i in input().split()]
CT = [[int(j) for j in input().split()] for i in range(N)]
res = 10**10
for c,t in CT:
    if t<=T:
        res=min(res,c)
if res==10**10:
    print("TLE")
else:
    print(res)

Solution (Python):

from sys import stdin

s_in = lambda: stdin.readline()[:-1] 
d_in = lambda: int(stdin.readline()) 
ds_in = lambda: list(map(int, stdin.readline().split())) 

N, T = ds_in()
cmin = 10**10

for _ in range(N):
    c, t = ds_in()
    if t <= T:
        cmin = min(cmin, c)

if cmin == 10**10:
    print('TLE')
else:
    print(cmin)

Solution (Python):
N,T = map(int,input().split())
src = [tuple(map(int,input().split())) for i in range(N)]
ans = 10**10
for c,t in src:
    if t <= T:
        ans = min(ans,c)
if ans == 10**10:
    print('TLE')
else:
    print(ans)

Solution (Python):
from sys import stdin
il = lambda func=int: list(map(func, stdin.readline().rstrip().split()))
ils = lambda n, s="int(input())": [eval(s) for _ in range(n)]

n, t = il()
l = ils(n, "il()")
l.sort(key=lambda x:x[1])
ans = 100000
for a, b in l:
    if b > t:
        break
    ans = min(ans, a)
print("TLE" if ans == 100000 else ans)

Solution (Python):
N, T = map(int, input().split())
ans = float('inf')
for i in range(N):
    c, t = map(int, input().split())
    if t <= T:
        ans = min(c, ans)
if ans == float('inf'):
    print('TLE')
else:
    print(ans)

Solution (Python):
N, T = map(int, input().split())
ans = float('inf')
for _ in range(N):
    c, t = map(int, input().split())
    if t <= T:
        ans = min(ans, c)
if ans == float('inf'):
    print('TLE')
else:
    print(ans)

Solution (Python):
n, t = map(int, input().split())
route = [list(map(int, input().split())) for _ in range(n)]
ans = float("inf")
for r in route:
	if r[1] <= t:
		ans = min(ans, r[0])

if ans == float("inf"):
	print("TLE")
else:
	print(ans)

Solution (Python):
N,T=map(int,input().split())

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

LIST=[]
for i in ct:
    if i[1]<=T:
        LIST.append(i[0])

if LIST==[]:
    print("TLE")

else:
    LIST.sort()
    print(LIST[0])

Solution (Python):
n, T = map(int, input().split())
ans = 1003
for _ in range(n):
    c, t = map(int, input().split())
    if t <= T:
        ans = min(ans, c)

print('TLE' if ans == 1003 else ans)

Solution (Python):
N,T = map(int,raw_input().split())
ans = 10000000
for i in range(N):
    a,b = map(int,raw_input().split())
    if b<=T:
        ans = min(ans,a)
if ans==10000000:
    print "TLE"
else:
    print ans

Solution (Python):
N, T = map(int, input().split())
ans = 1e9
for n in range(N):
    c, t = map(int, input().split())
    if t <= T:
        ans = min(ans, c)
if ans == 1e9:
    print('TLE')
else:
    print(ans)