fun main(args: Array<String>) {

    val (routesCount, maxTime) = readLine()!!.split(" ").map(String::toInt)

    val list = mutableListOf<List<Int>>()

    for (i in 1..routesCount)
        list.add(readLine()!!.split(" ").map(String::toInt))

    val result = list.filter {
        it[1] <= maxTime
    }.minBy {
        it[0]
    }

    println(if (result == null) "TLE" else result[0])
}