def a():

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

    c=list()

    t = list()

    for i in range(n[0]):

        s = list(map(int, input().split()))

        c.append(s[0])

        t.append(s[1])

    z=list()

    z[len(z):]=t[:len(t)]

    z.sort()

    if z[0]>n[1]:

        print("TLE")

        return 0

    l=0

    for i in range(1,len(c)):

        if (c[i]<=c[l]) & (t[i]<=n[1]):

            l = i

    print((c[l]))

    return 0

a()
def MRX():

    N,T = input().split()

    N,T= int(N),int(T)

    travel = {}

    for i in range(N):

        c , t = input().split()

        travel[int(c)] = int(t)

    for j in sorted(travel):

        if travel[j] <= T:

            return j

    return "TLE"







print((MRX()))
def a():
    n = list(map(int, input().split()))
    c = list()
    t = list()
    for i in range(n[0]):
        s = list(map(int, input().split()))
        c.append(s[0])
        t.append(s[1])
    z = list()
    z[len(z) :] = t[: len(t)]
    z.sort()
    if z[0] > n[1]:
        print("TLE")
        return 0
    l = 0
    for i in range(1, len(c)):
        if (c[i] <= c[l]) & (t[i] <= n[1]):
            l = i
    print((c[l]))
    return 0


a()

def MRX():
    N, T = input().split()
    N, T = int(N), int(T)
    travel = {}
    for i in range(N):
        c, t = input().split()
        travel[int(c)] = int(t)
    for j in sorted(travel):
        if travel[j] <= T:
            return j
    return "TLE"


print((MRX()))

-def a(): -    n = list(map(int, input().split())) -    c = list() -    t = list() -    for i in range(n[0]): -        s = list(map(int, input().split())) -        c.append(s[0]) -        t.append(s[1]) -    z = list() -    z[len(z) :] = t[: len(t)] -    z.sort() -    if z[0] > n[1]: -        print("TLE") -        return 0 -    l = 0 -    for i in range(1, len(c)): -        if (c[i] <= c[l]) & (t[i] <= n[1]): -            l = i -    print((c[l])) -    return 0 +def MRX(): +    N, T = input().split() +    N, T = int(N), int(T) +    travel = {} +    for i in range(N): +        c, t = input().split() +        travel[int(c)] = int(t) +    for j in sorted(travel): +        if travel[j] <= T: +            return j +    return "TLE" -a() +print((MRX()))