import java.util.*;

public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int T = sc.nextInt();
    int[] num = new int[2*N];
    int min = 1001;
    //String str = sc.next();
    for(int i=0; i<2*N; i++){
        num[i] = sc.nextInt();
    }    
    for(int i=0; i<N; i++){
        //System.out.println(i+":"+num[2*i]+"-"+num[2*i+1]);
        if(num[2*i+1] > T){
            num[2*i] = 1001;
        }
    }
    
    for(int i=0; i<N; i++){
        if(min > num[2*i]){
            min = num[2*i];
            //System.out.println(i+":"+min);
        }
    }
    //if(str[0].equals("H"));
    if(min == 1001){
        System.out.println("TLE");
    }else{
    System.out.println(min);
    }
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int T = sc.nextInt();
    int[] num = new int[2*N];
    int min = 1001;
    //String str = sc.next();
    for(int i=0; i<2*N; i++){
        num[i] = sc.nextInt();
    }    
    for(int i=0; i<N; i++){
        //System.out.println(i+":"+num[2*i]+"-"+num[2*i+1]);
        if(num[2*i+1] > T){
            num[2*i] = 1001;
        }
    }
    
    for(int i=0; i<N; i++){
        if(min > num[2*i]){
            min = num[2*i];
            //System.out.println(i+":"+min);
        }
    }
    //if(str[0].equals("H"));
    if(min == 1001){
        System.out.println("TLE");
    }else{
    System.out.println(min);
    }
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int T = sc.nextInt();
    int[] num = new int[2*N];
    int min = 1001;
    //String str = sc.next();
    for(int i=0; i<2*N; i++){
        num[i] = sc.nextInt();
    }    
    for(int i=0; i<N; i++){
        //System.out.println(i+":"+num[2*i]+"-"+num[2*i+1]);
        if(num[2*i+1] > T){
            num[2*i] = 1001;
        }
    }
    
    for(int i=0; i<N; i++){
        if(min > num[2*i]){
            min = num[2*i];
            //System.out.println(i+":"+min);
        }
    }
    //if(str[0].equals("H"));
    if(min == 1001){
        System.out.println("TLE");
    }else{
    System.out.println(min);
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int T = sc.nextInt();
    int[] num = new int[2*N];
    int min = 1001;
    //String str = sc.next();
    for(int i=0; i<2*N; i++){
        num[i] = sc.nextInt();
    }    
    for(int i=0; i<N; i++){
        //System.out.println(i+":"+num[2*i]+"-"+num[2*i+1]);
        if(num[2*i+1] > T){
            num[2*i] = 1001;
        }
    }
    
    for(int i=0; i<N; i++){
        if(min > num[2*i]){
            min = num[2*i];
            //System.out.println(i+":"+min);
        }
    }
    //if(str[0].equals("H"));
    if(min == 1001){
        System.out.println("TLE");
    }else{
    System.out.println(min);
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int T = sc.nextInt(); T sc.nextInt() sc.nextInt sc int[] num = new int[2*N]; num new int[2*N] 2*N 2 N int min = 1001; min 1001 for(int i=0; i<2*N; i++){
        num[i] = sc.nextInt();
    } int i=0; int i=0; i 0 i<2*N i 2*N 2 N i++ i++ i {
        num[i] = sc.nextInt();
    } {
        num[i] = sc.nextInt();
    } num[i] = sc.nextInt() num[i] num i sc.nextInt() sc.nextInt sc for(int i=0; i<N; i++){
        //System.out.println(i+":"+num[2*i]+"-"+num[2*i+1]);
        if(num[2*i+1] > T){
            num[2*i] = 1001;
        }
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
        //System.out.println(i+":"+num[2*i]+"-"+num[2*i+1]);
        if(num[2*i+1] > T){
            num[2*i] = 1001;
        }
    } {
        //System.out.println(i+":"+num[2*i]+"-"+num[2*i+1]);
        if(num[2*i+1] > T){
            num[2*i] = 1001;
        }
    } if(num[2*i+1] > T){
            num[2*i] = 1001;
        } num[2*i+1] > T num[2*i+1] num 2*i+1 2*i 2 i 1 T {
            num[2*i] = 1001;
        } num[2*i] = 1001 num[2*i] num 2*i 2 i 1001 for(int i=0; i<N; i++){
        if(min > num[2*i]){
            min = num[2*i];
            //System.out.println(i+":"+min);
        }
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
        if(min > num[2*i]){
            min = num[2*i];
            //System.out.println(i+":"+min);
        }
    } {
        if(min > num[2*i]){
            min = num[2*i];
            //System.out.println(i+":"+min);
        }
    } if(min > num[2*i]){
            min = num[2*i];
            //System.out.println(i+":"+min);
        } min > num[2*i] min num[2*i] num 2*i 2 i {
            min = num[2*i];
            //System.out.println(i+":"+min);
        } min = num[2*i] min num[2*i] num 2*i 2 i if(min == 1001){
        System.out.println("TLE");
    }else{
    System.out.println(min);
    } min == 1001 min 1001 {
        System.out.println("TLE");
    } System.out.println("TLE") System.out.println System.out System System.out "TLE" {
    System.out.println(min);
    } System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int T = sc.nextInt();
    int[] num = new int[2*N];
    int min = 1001;
    //String str = sc.next();
    for(int i=0; i<2*N; i++){
        num[i] = sc.nextInt();
    }    
    for(int i=0; i<N; i++){
        //System.out.println(i+":"+num[2*i]+"-"+num[2*i+1]);
        if(num[2*i+1] > T){
            num[2*i] = 1001;
        }
    }
    
    for(int i=0; i<N; i++){
        if(min > num[2*i]){
            min = num[2*i];
            //System.out.println(i+":"+min);
        }
    }
    //if(str[0].equals("H"));
    if(min == 1001){
        System.out.println("TLE");
    }else{
    System.out.println(min);
    }
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int T = sc.nextInt();
    int[] num = new int[2*N];
    int min = 1001;
    //String str = sc.next();
    for(int i=0; i<2*N; i++){
        num[i] = sc.nextInt();
    }    
    for(int i=0; i<N; i++){
        //System.out.println(i+":"+num[2*i]+"-"+num[2*i+1]);
        if(num[2*i+1] > T){
            num[2*i] = 1001;
        }
    }
    
    for(int i=0; i<N; i++){
        if(min > num[2*i]){
            min = num[2*i];
            //System.out.println(i+":"+min);
        }
    }
    //if(str[0].equals("H"));
    if(min == 1001){
        System.out.println("TLE");
    }else{
    System.out.println(min);
    }
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int T = sc.nextInt();
    int[] num = new int[2*N];
    int min = 1001;
    //String str = sc.next();
    for(int i=0; i<2*N; i++){
        num[i] = sc.nextInt();
    }    
    for(int i=0; i<N; i++){
        //System.out.println(i+":"+num[2*i]+"-"+num[2*i+1]);
        if(num[2*i+1] > T){
            num[2*i] = 1001;
        }
    }
    
    for(int i=0; i<N; i++){
        if(min > num[2*i]){
            min = num[2*i];
            //System.out.println(i+":"+min);
        }
    }
    //if(str[0].equals("H"));
    if(min == 1001){
        System.out.println("TLE");
    }else{
    System.out.println(min);
    }
  }
}
