'use strict';

function Main(input) {
  const N = Number(input.split("\n")[0].split(" ")[0]);
  const T = Number(input.split("\n")[0].split(" ")[1]);
  const list = input.split("\n").map(x => x.split(" "));
  let ans = 10000;
  let way = 10000;
  list.shift();

  for (let val of list) {
    if(Number(val[1]) <= T) {
      if(ans > Number(val[0])) {
        ans = Number(val[0]);
        way = Number(val[1]);
      } 
    }
  }

  if(ans === 10000) {
    console.log("TLE");
  } else {
    console.log(ans);
  }
  

};

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
