#include <algorithm>
#include <iostream>
#include <vector>

int main()
{
    int n, t;
    std::cin >> n >> t;

    std::vector<std::pair<int, int>> cost_time(n);
    for (int i = 0; i < n; i++) {
        std::cin >> cost_time[i].first >> cost_time[i].second;
    }

    std::sort(cost_time.begin(), cost_time.end());

    for (auto pair : cost_time) {
        if (pair.second <= t) {
            std::cout << pair.first << std::endl;
            return 0;
        }
    }
    std::cout << "TLE" << std::endl;
}
