let n, t = stdin.ReadLine().Split() |> fun x -> int x.[0], int x.[1]
let l = [for _ in 1..n -> stdin.ReadLine().Split() |> fun x -> int x.[0], int x.[1]] |> List.filter (fun (_, y) -> y <= t) |> List.sortBy (fun (_, y) -> y)
if (List.length l) = 0 then printfn "TLE" else printfn "%d" (fst l.[0])