import java.util.Scanner;

public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int N;   //経路数
	int T;   //最大時間

	N = scan.nextInt();
	T = scan.nextInt();

	int[] c = new int[N];   //コスト
	int[] t = new int[N];   //時間

	for(int i = 0; i < N; i++){
	    c[i] = scan.nextInt();
	    t[i] = scan.nextInt();
	}

	int min = 1001;   //最小コスト(初期値は境界の値)

	for(int i = 0; i < N; i++){
	    if(t[i] <= T){
		if(c[i] < min){
		    min = c[i];
		}
	    }
	}

	//最小経路が更新された場合
	if(min < 1001){
	    System.out.println(min);
	}else{
	    System.out.println("TLE");
	}
    }
}
	     import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int N;   //経路数
	int T;   //最大時間

	N = scan.nextInt();
	T = scan.nextInt();

	int[] c = new int[N];   //コスト
	int[] t = new int[N];   //時間

	for(int i = 0; i < N; i++){
	    c[i] = scan.nextInt();
	    t[i] = scan.nextInt();
	}

	int min = 1001;   //最小コスト(初期値は境界の値)

	for(int i = 0; i < N; i++){
	    if(t[i] <= T){
		if(c[i] < min){
		    min = c[i];
		}
	    }
	}

	//最小経路が更新された場合
	if(min < 1001){
	    System.out.println(min);
	}else{
	    System.out.println("TLE");
	}
    }
} Main public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int N;   //経路数
	int T;   //最大時間

	N = scan.nextInt();
	T = scan.nextInt();

	int[] c = new int[N];   //コスト
	int[] t = new int[N];   //時間

	for(int i = 0; i < N; i++){
	    c[i] = scan.nextInt();
	    t[i] = scan.nextInt();
	}

	int min = 1001;   //最小コスト(初期値は境界の値)

	for(int i = 0; i < N; i++){
	    if(t[i] <= T){
		if(c[i] < min){
		    min = c[i];
		}
	    }
	}

	//最小経路が更新された場合
	if(min < 1001){
	    System.out.println(min);
	}else{
	    System.out.println("TLE");
	}
    } main {
	Scanner scan = new Scanner(System.in);

	int N;   //経路数
	int T;   //最大時間

	N = scan.nextInt();
	T = scan.nextInt();

	int[] c = new int[N];   //コスト
	int[] t = new int[N];   //時間

	for(int i = 0; i < N; i++){
	    c[i] = scan.nextInt();
	    t[i] = scan.nextInt();
	}

	int min = 1001;   //最小コスト(初期値は境界の値)

	for(int i = 0; i < N; i++){
	    if(t[i] <= T){
		if(c[i] < min){
		    min = c[i];
		}
	    }
	}

	//最小経路が更新された場合
	if(min < 1001){
	    System.out.println(min);
	}else{
	    System.out.println("TLE");
	}
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N; N int T; T N = scan.nextInt() N scan.nextInt() scan.nextInt scan T = scan.nextInt() T scan.nextInt() scan.nextInt scan int[] c = new int[N]; c new int[N] N int[] t = new int[N]; t new int[N] N for(int i = 0; i < N; i++){
	    c[i] = scan.nextInt();
	    t[i] = scan.nextInt();
	} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
	    c[i] = scan.nextInt();
	    t[i] = scan.nextInt();
	} {
	    c[i] = scan.nextInt();
	    t[i] = scan.nextInt();
	} c[i] = scan.nextInt() c[i] c i scan.nextInt() scan.nextInt scan t[i] = scan.nextInt() t[i] t i scan.nextInt() scan.nextInt scan int min = 1001; min 1001 for(int i = 0; i < N; i++){
	    if(t[i] <= T){
		if(c[i] < min){
		    min = c[i];
		}
	    }
	} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
	    if(t[i] <= T){
		if(c[i] < min){
		    min = c[i];
		}
	    }
	} {
	    if(t[i] <= T){
		if(c[i] < min){
		    min = c[i];
		}
	    }
	} if(t[i] <= T){
		if(c[i] < min){
		    min = c[i];
		}
	    } t[i] <= T t[i] t i T {
		if(c[i] < min){
		    min = c[i];
		}
	    } if(c[i] < min){
		    min = c[i];
		} c[i] < min c[i] c i min {
		    min = c[i];
		} min = c[i] min c[i] c i if(min < 1001){
	    System.out.println(min);
	}else{
	    System.out.println("TLE");
	} min < 1001 min 1001 {
	    System.out.println(min);
	} 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" String[] args args public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int N;   //経路数
	int T;   //最大時間

	N = scan.nextInt();
	T = scan.nextInt();

	int[] c = new int[N];   //コスト
	int[] t = new int[N];   //時間

	for(int i = 0; i < N; i++){
	    c[i] = scan.nextInt();
	    t[i] = scan.nextInt();
	}

	int min = 1001;   //最小コスト(初期値は境界の値)

	for(int i = 0; i < N; i++){
	    if(t[i] <= T){
		if(c[i] < min){
		    min = c[i];
		}
	    }
	}

	//最小経路が更新された場合
	if(min < 1001){
	    System.out.println(min);
	}else{
	    System.out.println("TLE");
	}
    }
} public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int N;   //経路数
	int T;   //最大時間

	N = scan.nextInt();
	T = scan.nextInt();

	int[] c = new int[N];   //コスト
	int[] t = new int[N];   //時間

	for(int i = 0; i < N; i++){
	    c[i] = scan.nextInt();
	    t[i] = scan.nextInt();
	}

	int min = 1001;   //最小コスト(初期値は境界の値)

	for(int i = 0; i < N; i++){
	    if(t[i] <= T){
		if(c[i] < min){
		    min = c[i];
		}
	    }
	}

	//最小経路が更新された場合
	if(min < 1001){
	    System.out.println(min);
	}else{
	    System.out.println("TLE");
	}
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);

	int N;   //経路数
	int T;   //最大時間

	N = scan.nextInt();
	T = scan.nextInt();

	int[] c = new int[N];   //コスト
	int[] t = new int[N];   //時間

	for(int i = 0; i < N; i++){
	    c[i] = scan.nextInt();
	    t[i] = scan.nextInt();
	}

	int min = 1001;   //最小コスト(初期値は境界の値)

	for(int i = 0; i < N; i++){
	    if(t[i] <= T){
		if(c[i] < min){
		    min = c[i];
		}
	    }
	}

	//最小経路が更新された場合
	if(min < 1001){
	    System.out.println(min);
	}else{
	    System.out.println("TLE");
	}
    }
}
	    
