import java.io.*;
public class Main{
    public static void main(String[] args) throws IOException{
        Reader r = new Reader();      
        int[] a = r.ii();
        int N = a[0],
            T = a[1],
            min = 1001;

        for(int i = 0; i < N; i++){
            a = r.ii();
            if(a[1] <= T){
                if(a[0] < min){
                    min = a[0];
                }
            }
        }        
        print(1000 < min ? "TLE" : String.valueOf(min));
    }
    static void print(Object o){
        System.out.println(o.toString());
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }

        String s() throws IOException{
            return readLine();
        }

        String[] ss() throws IOException{
            return s().split(" ");
        }

        int Int(String s){
            return Integer.parseInt(s);
        }

        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        }
    }
} import java.io.*; io.* java public class Main{
    public static void main(String[] args) throws IOException{
        Reader r = new Reader();      
        int[] a = r.ii();
        int N = a[0],
            T = a[1],
            min = 1001;

        for(int i = 0; i < N; i++){
            a = r.ii();
            if(a[1] <= T){
                if(a[0] < min){
                    min = a[0];
                }
            }
        }        
        print(1000 < min ? "TLE" : String.valueOf(min));
    }
    static void print(Object o){
        System.out.println(o.toString());
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }

        String s() throws IOException{
            return readLine();
        }

        String[] ss() throws IOException{
            return s().split(" ");
        }

        int Int(String s){
            return Integer.parseInt(s);
        }

        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        }
    }
} Main public static void main(String[] args) throws IOException{
        Reader r = new Reader();      
        int[] a = r.ii();
        int N = a[0],
            T = a[1],
            min = 1001;

        for(int i = 0; i < N; i++){
            a = r.ii();
            if(a[1] <= T){
                if(a[0] < min){
                    min = a[0];
                }
            }
        }        
        print(1000 < min ? "TLE" : String.valueOf(min));
    } main {
        Reader r = new Reader();      
        int[] a = r.ii();
        int N = a[0],
            T = a[1],
            min = 1001;

        for(int i = 0; i < N; i++){
            a = r.ii();
            if(a[1] <= T){
                if(a[0] < min){
                    min = a[0];
                }
            }
        }        
        print(1000 < min ? "TLE" : String.valueOf(min));
    } Reader r = new Reader(); r new Reader() int[] a = r.ii(); a r.ii() r.ii r int N = a[0] N a[0] a 0 T = a[1] T a[1] a 1 min = 1001; min 1001 for(int i = 0; i < N; i++){
            a = r.ii();
            if(a[1] <= T){
                if(a[0] < min){
                    min = a[0];
                }
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            a = r.ii();
            if(a[1] <= T){
                if(a[0] < min){
                    min = a[0];
                }
            }
        } {
            a = r.ii();
            if(a[1] <= T){
                if(a[0] < min){
                    min = a[0];
                }
            }
        } a = r.ii() a r.ii() r.ii r if(a[1] <= T){
                if(a[0] < min){
                    min = a[0];
                }
            } a[1] <= T a[1] a 1 T {
                if(a[0] < min){
                    min = a[0];
                }
            } if(a[0] < min){
                    min = a[0];
                } a[0] < min a[0] a 0 min {
                    min = a[0];
                } min = a[0] min a[0] a 0 print(1000 < min ? "TLE" : String.valueOf(min)) print 1000 < min ? "TLE" : String.valueOf(min) 1000 < min 1000 min "TLE" String.valueOf(min) String.valueOf String min String[] args args static void print(Object o){
        System.out.println(o.toString());
    } print {
        System.out.println(o.toString());
    } System.out.println(o.toString()) System.out.println System.out System System.out o.toString() o.toString o Object o o static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }

        String s() throws IOException{
            return readLine();
        }

        String[] ss() throws IOException{
            return s().split(" ");
        }

        int Int(String s){
            return Integer.parseInt(s);
        }

        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        }
    } Reader Reader(){
            super(new InputStreamReader(System.in));
        } Reader {
            super(new InputStreamReader(System.in));
        } super(new InputStreamReader(System.in)) super new InputStreamReader(System.in) String s() throws IOException{
            return readLine();
        } s {
            return readLine();
        } return readLine(); readLine() readLine String[] ss() throws IOException{
            return s().split(" ");
        } ss {
            return s().split(" ");
        } return s().split(" "); s().split(" ") s().split s() s " " int Int(String s){
            return Integer.parseInt(s);
        } Int {
            return Integer.parseInt(s);
        } return Integer.parseInt(s); Integer.parseInt(s) Integer.parseInt Integer s String s s int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        } ii {
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        } String[] ss = ss(); ss ss() ss int size = ss.length; size ss.length ss ss.length int[] ii = new int[size]; ii new int[size] size for(int j = 0; j < size; j++) ii[j] = Int(ss[j]); int j = 0; int j = 0; j 0 j < size j size j++ j++ j ii[j] = Int(ss[j]); ii[j] = Int(ss[j]) ii[j] ii j Int(ss[j]) Int ss[j] ss j return ii; ii BufferedReader public class Main{
    public static void main(String[] args) throws IOException{
        Reader r = new Reader();      
        int[] a = r.ii();
        int N = a[0],
            T = a[1],
            min = 1001;

        for(int i = 0; i < N; i++){
            a = r.ii();
            if(a[1] <= T){
                if(a[0] < min){
                    min = a[0];
                }
            }
        }        
        print(1000 < min ? "TLE" : String.valueOf(min));
    }
    static void print(Object o){
        System.out.println(o.toString());
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }

        String s() throws IOException{
            return readLine();
        }

        String[] ss() throws IOException{
            return s().split(" ");
        }

        int Int(String s){
            return Integer.parseInt(s);
        }

        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        }
    }
} public class Main{
    public static void main(String[] args) throws IOException{
        Reader r = new Reader();      
        int[] a = r.ii();
        int N = a[0],
            T = a[1],
            min = 1001;

        for(int i = 0; i < N; i++){
            a = r.ii();
            if(a[1] <= T){
                if(a[0] < min){
                    min = a[0];
                }
            }
        }        
        print(1000 < min ? "TLE" : String.valueOf(min));
    }
    static void print(Object o){
        System.out.println(o.toString());
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }

        String s() throws IOException{
            return readLine();
        }

        String[] ss() throws IOException{
            return s().split(" ");
        }

        int Int(String s){
            return Integer.parseInt(s);
        }

        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        }
    }
} Main
import java.io.*;
public class Main{
    public static void main(String[] args) throws IOException{
        Reader r = new Reader();      
        int[] a = r.ii();
        int N = a[0],
            T = a[1],
            min = 1001;

        for(int i = 0; i < N; i++){
            a = r.ii();
            if(a[1] <= T){
                if(a[0] < min){
                    min = a[0];
                }
            }
        }        
        print(1000 < min ? "TLE" : String.valueOf(min));
    }
    static void print(Object o){
        System.out.println(o.toString());
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }

        String s() throws IOException{
            return readLine();
        }

        String[] ss() throws IOException{
            return s().split(" ");
        }

        int Int(String s){
            return Integer.parseInt(s);
        }

        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Int(ss[j]);
            return ii;
        }
    }
}