"use strict";
function Main(input) {
    let lines = input.split("\n");
    let cols = lines.shift().split(/\s/).map((v) => v - 0);
    let N = cols[0], T = cols[1];
    let CT = [];
    for (let n = 0; n < N; n++) {
        let cols = lines.shift().split(/\s/).map((v) => v - 0);
        CT.push([n + 1, cols[0], cols[1]]);
    }
    CT.sort((a, b) => a[1] - b[1]);
    for (let n = 0; n < N; n++) {
        if (CT[n][2] <= T) {
            console.log(CT[n][1]);
            return;
        }
    }
    console.log('TLE');
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
