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