input = require("fs").readFileSync("/dev/stdin", "utf8").split('\n');
T = ~~input[0].split(' ')[1];
input.shift();

i = -1;
c = 1001;
input.map((x, y) => {
      stack = x.split(' ').map(Number);
      if (stack[1] < T && stack[0] < c) {
            c = stack[0];
            i = c;
      }
});

console.log(i < 0 ? 'TLE' : i);