function main(arg) {
    var lines = arg.split("\n");
    var N = lines[0].split(" ")[0];
    var T = lines[0].split(" ")[1];
    lines.shift();
    var paths = lines;
    var answer;
    var max;
    
    for(var i=0; i<paths.length; i++) {
        var c = paths[i].split(" ")[0];
        var t = paths[i].split(" ")[1];
        
        if( parseInt(t) > parseInt(T) ) continue;
        answer = Math.min(c, max);
        max = c;
    }
    
    if(answer === undefined ) {
        console.log("TLE");
        return;
    }
    
    console.log(answer);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));