import java.util.Scanner;

/**
 *
 * @author Ivan Eka
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = 0;
        int c = 0, t;
        int N = sc.nextInt();
        int T = sc.nextInt();
        int[][] Route = new int[N][2];
        for (int c1 = 0; c1 < N; c1++) {
            Route[c1][0] = sc.nextInt();
            Route[c1][1] = sc.nextInt();
            if (Route[c1][1] > T) {
                count++;
            }
        }
        if (count == N) {
            System.out.println("TLE");
        } else {
            c = Route[0][0];
            for (int c2 = 0; c2 < N; c2++) {
                if (T >= Route[c2][1]) {
                    if (c > Route[c2][0]) {
                        c = Route[c2][0];
                    }
                }
            }
            System.out.println(c);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = 0;
        int c = 0, t;
        int N = sc.nextInt();
        int T = sc.nextInt();
        int[][] Route = new int[N][2];
        for (int c1 = 0; c1 < N; c1++) {
            Route[c1][0] = sc.nextInt();
            Route[c1][1] = sc.nextInt();
            if (Route[c1][1] > T) {
                count++;
            }
        }
        if (count == N) {
            System.out.println("TLE");
        } else {
            c = Route[0][0];
            for (int c2 = 0; c2 < N; c2++) {
                if (T >= Route[c2][1]) {
                    if (c > Route[c2][0]) {
                        c = Route[c2][0];
                    }
                }
            }
            System.out.println(c);
        }
    }
} Main /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = 0;
        int c = 0, t;
        int N = sc.nextInt();
        int T = sc.nextInt();
        int[][] Route = new int[N][2];
        for (int c1 = 0; c1 < N; c1++) {
            Route[c1][0] = sc.nextInt();
            Route[c1][1] = sc.nextInt();
            if (Route[c1][1] > T) {
                count++;
            }
        }
        if (count == N) {
            System.out.println("TLE");
        } else {
            c = Route[0][0];
            for (int c2 = 0; c2 < N; c2++) {
                if (T >= Route[c2][1]) {
                    if (c > Route[c2][0]) {
                        c = Route[c2][0];
                    }
                }
            }
            System.out.println(c);
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int count = 0;
        int c = 0, t;
        int N = sc.nextInt();
        int T = sc.nextInt();
        int[][] Route = new int[N][2];
        for (int c1 = 0; c1 < N; c1++) {
            Route[c1][0] = sc.nextInt();
            Route[c1][1] = sc.nextInt();
            if (Route[c1][1] > T) {
                count++;
            }
        }
        if (count == N) {
            System.out.println("TLE");
        } else {
            c = Route[0][0];
            for (int c2 = 0; c2 < N; c2++) {
                if (T >= Route[c2][1]) {
                    if (c > Route[c2][0]) {
                        c = Route[c2][0];
                    }
                }
            }
            System.out.println(c);
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int count = 0; count 0 int c = 0 c 0 t; t int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int T = sc.nextInt(); T sc.nextInt() sc.nextInt sc int[][] Route = new int[N][2]; Route new int[N][2] N 2 for (int c1 = 0; c1 < N; c1++) {
            Route[c1][0] = sc.nextInt();
            Route[c1][1] = sc.nextInt();
            if (Route[c1][1] > T) {
                count++;
            }
        } int c1 = 0; int c1 = 0; c1 0 c1 < N c1 N c1++ c1++ c1 {
            Route[c1][0] = sc.nextInt();
            Route[c1][1] = sc.nextInt();
            if (Route[c1][1] > T) {
                count++;
            }
        } {
            Route[c1][0] = sc.nextInt();
            Route[c1][1] = sc.nextInt();
            if (Route[c1][1] > T) {
                count++;
            }
        } Route[c1][0] = sc.nextInt() Route[c1][0] Route[c1] Route c1 0 sc.nextInt() sc.nextInt sc Route[c1][1] = sc.nextInt() Route[c1][1] Route[c1] Route c1 1 sc.nextInt() sc.nextInt sc if (Route[c1][1] > T) {
                count++;
            } Route[c1][1] > T Route[c1][1] Route[c1] Route c1 1 T {
                count++;
            } count++ count if (count == N) {
            System.out.println("TLE");
        } else {
            c = Route[0][0];
            for (int c2 = 0; c2 < N; c2++) {
                if (T >= Route[c2][1]) {
                    if (c > Route[c2][0]) {
                        c = Route[c2][0];
                    }
                }
            }
            System.out.println(c);
        } count == N count N {
            System.out.println("TLE");
        } System.out.println("TLE") System.out.println System.out System System.out "TLE" {
            c = Route[0][0];
            for (int c2 = 0; c2 < N; c2++) {
                if (T >= Route[c2][1]) {
                    if (c > Route[c2][0]) {
                        c = Route[c2][0];
                    }
                }
            }
            System.out.println(c);
        } c = Route[0][0] c Route[0][0] Route[0] Route 0 0 for (int c2 = 0; c2 < N; c2++) {
                if (T >= Route[c2][1]) {
                    if (c > Route[c2][0]) {
                        c = Route[c2][0];
                    }
                }
            } int c2 = 0; int c2 = 0; c2 0 c2 < N c2 N c2++ c2++ c2 {
                if (T >= Route[c2][1]) {
                    if (c > Route[c2][0]) {
                        c = Route[c2][0];
                    }
                }
            } {
                if (T >= Route[c2][1]) {
                    if (c > Route[c2][0]) {
                        c = Route[c2][0];
                    }
                }
            } if (T >= Route[c2][1]) {
                    if (c > Route[c2][0]) {
                        c = Route[c2][0];
                    }
                } T >= Route[c2][1] T Route[c2][1] Route[c2] Route c2 1 {
                    if (c > Route[c2][0]) {
                        c = Route[c2][0];
                    }
                } if (c > Route[c2][0]) {
                        c = Route[c2][0];
                    } c > Route[c2][0] c Route[c2][0] Route[c2] Route c2 0 {
                        c = Route[c2][0];
                    } c = Route[c2][0] c Route[c2][0] Route[c2] Route c2 0 System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = 0;
        int c = 0, t;
        int N = sc.nextInt();
        int T = sc.nextInt();
        int[][] Route = new int[N][2];
        for (int c1 = 0; c1 < N; c1++) {
            Route[c1][0] = sc.nextInt();
            Route[c1][1] = sc.nextInt();
            if (Route[c1][1] > T) {
                count++;
            }
        }
        if (count == N) {
            System.out.println("TLE");
        } else {
            c = Route[0][0];
            for (int c2 = 0; c2 < N; c2++) {
                if (T >= Route[c2][1]) {
                    if (c > Route[c2][0]) {
                        c = Route[c2][0];
                    }
                }
            }
            System.out.println(c);
        }
    }
} public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = 0;
        int c = 0, t;
        int N = sc.nextInt();
        int T = sc.nextInt();
        int[][] Route = new int[N][2];
        for (int c1 = 0; c1 < N; c1++) {
            Route[c1][0] = sc.nextInt();
            Route[c1][1] = sc.nextInt();
            if (Route[c1][1] > T) {
                count++;
            }
        }
        if (count == N) {
            System.out.println("TLE");
        } else {
            c = Route[0][0];
            for (int c2 = 0; c2 < N; c2++) {
                if (T >= Route[c2][1]) {
                    if (c > Route[c2][0]) {
                        c = Route[c2][0];
                    }
                }
            }
            System.out.println(c);
        }
    }
} Main
import java.util.Scanner;

/**
 *
 * @author Ivan Eka
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count = 0;
        int c = 0, t;
        int N = sc.nextInt();
        int T = sc.nextInt();
        int[][] Route = new int[N][2];
        for (int c1 = 0; c1 < N; c1++) {
            Route[c1][0] = sc.nextInt();
            Route[c1][1] = sc.nextInt();
            if (Route[c1][1] > T) {
                count++;
            }
        }
        if (count == N) {
            System.out.println("TLE");
        } else {
            c = Route[0][0];
            for (int c2 = 0; c2 < N; c2++) {
                if (T >= Route[c2][1]) {
                    if (c > Route[c2][0]) {
                        c = Route[c2][0];
                    }
                }
            }
            System.out.println(c);
        }
    }
}