import scala.io.StdIn._
object Main {
  def main(args: Array[String]): Unit = {
    val input1 = readLine.split(" ")
    val N = input1(0).toInt
    val T = input1(1).toInt
    val ctls = for(i <- 1 to N) yield readLine
    val ctls2 = ctls map {
      ele =>
        val seq = ele.split(" ") map {_.toInt}
        (seq(0),seq(1))
    } filter {
      ele => ele._2 <= T
    } sortBy {
      ele => ele._1
    }
    if(ctls2.isEmpty) println("TLE")
    else println(ctls2(0)._1)
  }
}
