fun main(args: Array<String>) {
    val line = readLine()!!.split(' ').map { it.toInt() }
    val n = line[0]
    val t = line[1]
    var ans = -1
    var isFirst = true
    for (i in (1..n)) {
        val l = readLine()!!.split(' ').map { it.toInt() }
        if (isFirst && l[1] <= t || l[0] < ans && l[1] <= t) {
            ans = l[0]
            isFirst = false
        }
    }
    if (ans == -1) {
        println("TLE")
    } else {
        println(ans)
    }
}