fun main(arr:Array<String>) {
    val (n,t) = readLine()!!.split(" ").map { it.toInt() }
    val keiroList = (1..n).map {idx-> readLine()!!.split(" ").map { it.toInt() }.let { listOf(idx, it[0], it[1]) } }.filter { it[2] <= t }.sortedBy { it[1] }
    println(if(keiroList.isEmpty()) "TLE" else keiroList.first()[1])
}
