import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.TreeMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TimeLimitExceeded solver = new TimeLimitExceeded();
        solver.solve(1, in, out);
        out.close();
    }

    static class TimeLimitExceeded {
        public void solve(int testNumber, Scanner in, PrintWriter out) {

            int N = in.nextInt();
            int limitedTime = in.nextInt();

            Map<Integer, Integer> input = new TreeMap<>();

            // 経路値の入力の取得
            for (int i = 0; i < N; i++) {
                input.put(in.nextInt(), in.nextInt());
            }

            int ans = 0;
            for (Map.Entry<Integer, Integer> e : input.entrySet()) {
                if (e.getValue() <= limitedTime) {
                    ans = e.getKey();
                    break;
                }
            }

            if (ans == 0) {
                out.println("TLE");
                return;
            }

            out.println(ans);
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.TreeMap; TreeMap java.util import java.util.Map; Map java.util import java.util.Map.Entry; Entry java.util.Map import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TimeLimitExceeded solver = new TimeLimitExceeded();
        solver.solve(1, in, out);
        out.close();
    }

    static class TimeLimitExceeded {
        public void solve(int testNumber, Scanner in, PrintWriter out) {

            int N = in.nextInt();
            int limitedTime = in.nextInt();

            Map<Integer, Integer> input = new TreeMap<>();

            // 経路値の入力の取得
            for (int i = 0; i < N; i++) {
                input.put(in.nextInt(), in.nextInt());
            }

            int ans = 0;
            for (Map.Entry<Integer, Integer> e : input.entrySet()) {
                if (e.getValue() <= limitedTime) {
                    ans = e.getKey();
                    break;
                }
            }

            if (ans == 0) {
                out.println("TLE");
                return;
            }

            out.println(ans);
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TimeLimitExceeded solver = new TimeLimitExceeded();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TimeLimitExceeded solver = new TimeLimitExceeded();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) TimeLimitExceeded solver = new TimeLimitExceeded(); solver new TimeLimitExceeded() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class TimeLimitExceeded {
        public void solve(int testNumber, Scanner in, PrintWriter out) {

            int N = in.nextInt();
            int limitedTime = in.nextInt();

            Map<Integer, Integer> input = new TreeMap<>();

            // 経路値の入力の取得
            for (int i = 0; i < N; i++) {
                input.put(in.nextInt(), in.nextInt());
            }

            int ans = 0;
            for (Map.Entry<Integer, Integer> e : input.entrySet()) {
                if (e.getValue() <= limitedTime) {
                    ans = e.getKey();
                    break;
                }
            }

            if (ans == 0) {
                out.println("TLE");
                return;
            }

            out.println(ans);
        }

    } TimeLimitExceeded public void solve(int testNumber, Scanner in, PrintWriter out) {

            int N = in.nextInt();
            int limitedTime = in.nextInt();

            Map<Integer, Integer> input = new TreeMap<>();

            // 経路値の入力の取得
            for (int i = 0; i < N; i++) {
                input.put(in.nextInt(), in.nextInt());
            }

            int ans = 0;
            for (Map.Entry<Integer, Integer> e : input.entrySet()) {
                if (e.getValue() <= limitedTime) {
                    ans = e.getKey();
                    break;
                }
            }

            if (ans == 0) {
                out.println("TLE");
                return;
            }

            out.println(ans);
        } solve {

            int N = in.nextInt();
            int limitedTime = in.nextInt();

            Map<Integer, Integer> input = new TreeMap<>();

            // 経路値の入力の取得
            for (int i = 0; i < N; i++) {
                input.put(in.nextInt(), in.nextInt());
            }

            int ans = 0;
            for (Map.Entry<Integer, Integer> e : input.entrySet()) {
                if (e.getValue() <= limitedTime) {
                    ans = e.getKey();
                    break;
                }
            }

            if (ans == 0) {
                out.println("TLE");
                return;
            }

            out.println(ans);
        } int N = in.nextInt(); N in.nextInt() in.nextInt in int limitedTime = in.nextInt(); limitedTime in.nextInt() in.nextInt in Map<Integer, Integer> input = new TreeMap<>(); input new TreeMap<>() for (int i = 0; i < N; i++) {
                input.put(in.nextInt(), in.nextInt());
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                input.put(in.nextInt(), in.nextInt());
            } {
                input.put(in.nextInt(), in.nextInt());
            } input.put(in.nextInt(), in.nextInt()) input.put input in.nextInt() in.nextInt in in.nextInt() in.nextInt in int ans = 0; ans 0 for (Map.Entry<Integer, Integer> e : input.entrySet()) {
                if (e.getValue() <= limitedTime) {
                    ans = e.getKey();
                    break;
                }
            } Map.Entry<Integer, Integer> e input.entrySet() input.entrySet input {
                if (e.getValue() <= limitedTime) {
                    ans = e.getKey();
                    break;
                }
            } {
                if (e.getValue() <= limitedTime) {
                    ans = e.getKey();
                    break;
                }
            } if (e.getValue() <= limitedTime) {
                    ans = e.getKey();
                    break;
                } e.getValue() <= limitedTime e.getValue() e.getValue e limitedTime {
                    ans = e.getKey();
                    break;
                } ans = e.getKey() ans e.getKey() e.getKey e break; if (ans == 0) {
                out.println("TLE");
                return;
            } ans == 0 ans 0 {
                out.println("TLE");
                return;
            } out.println("TLE") out.println out "TLE" return; out.println(ans) out.println out ans int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TimeLimitExceeded solver = new TimeLimitExceeded();
        solver.solve(1, in, out);
        out.close();
    }

    static class TimeLimitExceeded {
        public void solve(int testNumber, Scanner in, PrintWriter out) {

            int N = in.nextInt();
            int limitedTime = in.nextInt();

            Map<Integer, Integer> input = new TreeMap<>();

            // 経路値の入力の取得
            for (int i = 0; i < N; i++) {
                input.put(in.nextInt(), in.nextInt());
            }

            int ans = 0;
            for (Map.Entry<Integer, Integer> e : input.entrySet()) {
                if (e.getValue() <= limitedTime) {
                    ans = e.getKey();
                    break;
                }
            }

            if (ans == 0) {
                out.println("TLE");
                return;
            }

            out.println(ans);
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TimeLimitExceeded solver = new TimeLimitExceeded();
        solver.solve(1, in, out);
        out.close();
    }

    static class TimeLimitExceeded {
        public void solve(int testNumber, Scanner in, PrintWriter out) {

            int N = in.nextInt();
            int limitedTime = in.nextInt();

            Map<Integer, Integer> input = new TreeMap<>();

            // 経路値の入力の取得
            for (int i = 0; i < N; i++) {
                input.put(in.nextInt(), in.nextInt());
            }

            int ans = 0;
            for (Map.Entry<Integer, Integer> e : input.entrySet()) {
                if (e.getValue() <= limitedTime) {
                    ans = e.getKey();
                    break;
                }
            }

            if (ans == 0) {
                out.println("TLE");
                return;
            }

            out.println(ans);
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.TreeMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TimeLimitExceeded solver = new TimeLimitExceeded();
        solver.solve(1, in, out);
        out.close();
    }

    static class TimeLimitExceeded {
        public void solve(int testNumber, Scanner in, PrintWriter out) {

            int N = in.nextInt();
            int limitedTime = in.nextInt();

            Map<Integer, Integer> input = new TreeMap<>();

            // 経路値の入力の取得
            for (int i = 0; i < N; i++) {
                input.put(in.nextInt(), in.nextInt());
            }

            int ans = 0;
            for (Map.Entry<Integer, Integer> e : input.entrySet()) {
                if (e.getValue() <= limitedTime) {
                    ans = e.getKey();
                    break;
                }
            }

            if (ans == 0) {
                out.println("TLE");
                return;
            }

            out.println(ans);
        }

    }
}

