import std.stdio, std.string, std.range, std.conv, std.array, std.algorithm, std.math, std.typecons;

void main() {
    const tmp = readln.split.to!(int[]);
    const N = tmp[0], T = tmp[1];
    auto candidates = N.iota.map!(_ => readln.split.to!(int[])).array.filter!(t => t[1] <= T);
    writeln(candidates.empty ? "TLE" : candidates.map!(t => t[0]).reduce!min.to!string);
}

