import java.util.Scanner;
class Main{
	public static void main(String[] args) {
		int n,T,i,c,t,min,temp;
        i = 0;
        temp = 1001;
		Scanner sc = new Scanner(System.in);

		n = sc.nextInt();
		T = sc.nextInt();

		while(i < n){
			c = sc.nextInt();
			t = sc.nextInt();
			if(t <= T && c < temp){
                temp = c;
			}
            i++;
		}
      if(temp != 1001){
      	min = temp;
        System.out.println(min);
      }else{
        System.out.println("TLE");
      }
      
      sc.close();
      return;
	  }
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args) {
		int n,T,i,c,t,min,temp;
        i = 0;
        temp = 1001;
		Scanner sc = new Scanner(System.in);

		n = sc.nextInt();
		T = sc.nextInt();

		while(i < n){
			c = sc.nextInt();
			t = sc.nextInt();
			if(t <= T && c < temp){
                temp = c;
			}
            i++;
		}
      if(temp != 1001){
      	min = temp;
        System.out.println(min);
      }else{
        System.out.println("TLE");
      }
      
      sc.close();
      return;
	  }
} Main public static void main(String[] args) {
		int n,T,i,c,t,min,temp;
        i = 0;
        temp = 1001;
		Scanner sc = new Scanner(System.in);

		n = sc.nextInt();
		T = sc.nextInt();

		while(i < n){
			c = sc.nextInt();
			t = sc.nextInt();
			if(t <= T && c < temp){
                temp = c;
			}
            i++;
		}
      if(temp != 1001){
      	min = temp;
        System.out.println(min);
      }else{
        System.out.println("TLE");
      }
      
      sc.close();
      return;
	  } main {
		int n,T,i,c,t,min,temp;
        i = 0;
        temp = 1001;
		Scanner sc = new Scanner(System.in);

		n = sc.nextInt();
		T = sc.nextInt();

		while(i < n){
			c = sc.nextInt();
			t = sc.nextInt();
			if(t <= T && c < temp){
                temp = c;
			}
            i++;
		}
      if(temp != 1001){
      	min = temp;
        System.out.println(min);
      }else{
        System.out.println("TLE");
      }
      
      sc.close();
      return;
	  } int n n T T i i c c t t min min temp; temp i = 0 i 0 temp = 1001 temp 1001 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) n = sc.nextInt() n sc.nextInt() sc.nextInt sc T = sc.nextInt() T sc.nextInt() sc.nextInt sc while(i < n){
			c = sc.nextInt();
			t = sc.nextInt();
			if(t <= T && c < temp){
                temp = c;
			}
            i++;
		} i < n i n {
			c = sc.nextInt();
			t = sc.nextInt();
			if(t <= T && c < temp){
                temp = c;
			}
            i++;
		} c = sc.nextInt() c sc.nextInt() sc.nextInt sc t = sc.nextInt() t sc.nextInt() sc.nextInt sc if(t <= T && c < temp){
                temp = c;
			} t <= T && c < temp t <= T t T c < temp c temp {
                temp = c;
			} temp = c temp c i++ i if(temp != 1001){
      	min = temp;
        System.out.println(min);
      }else{
        System.out.println("TLE");
      } temp != 1001 temp 1001 {
      	min = temp;
        System.out.println(min);
      } min = temp min temp System.out.println(min) System.out.println System.out System System.out min {
        System.out.println("TLE");
      } System.out.println("TLE") System.out.println System.out System System.out "TLE" sc.close() sc.close sc return; String[] args args
import java.util.Scanner;
class Main{
	public static void main(String[] args) {
		int n,T,i,c,t,min,temp;
        i = 0;
        temp = 1001;
		Scanner sc = new Scanner(System.in);

		n = sc.nextInt();
		T = sc.nextInt();

		while(i < n){
			c = sc.nextInt();
			t = sc.nextInt();
			if(t <= T && c < temp){
                temp = c;
			}
            i++;
		}
      if(temp != 1001){
      	min = temp;
        System.out.println(min);
      }else{
        System.out.println("TLE");
      }
      
      sc.close();
      return;
	  }
}