'use strict';

var hasN = false;
// p1: 2D split
// p2: space split
// p3: line split
function main(p1, p2, p3, so) {
  var time = Number(p1[0][1]);
  p1.shift();
  p1 = p1.filter(function (e) {
    return time >= Number(e[1]);
  });
  if (p1.length == 0) {
    console.log("TLE");return;
  }
  p1 = p1.map(function (e) {
    return e[0];
  });
  console.log(Math.min.apply(null, p1));
}
function common(a) {
  var line = a.split('\n').slice(0, a.split('\n').length - 1);
  var p2 = line[0].split(' ');
  if (hasN) line = line.slice(1);
  var p1 = line.map(function (e) {
    return e.split(' ');
  });
  main(p1, p2, line, a);
}
common(require("fs").readFileSync("/dev/stdin", "utf8"));
