import java.util.*;

class Main{

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

		int N = sc.nextInt();
		int T = sc.nextInt();
		int min = 1001;
		String ans = "TLE";

		for(int i = 0; i < N; i++){
			int c = sc.nextInt();
			int t = sc.nextInt(); 

			if((c < min) && (t <= T)){
				min = c;
				ans = "" + c;
			}
		}
		System.out.println(ans);


	}
} import java.util.*; util.* java class Main{

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

		int N = sc.nextInt();
		int T = sc.nextInt();
		int min = 1001;
		String ans = "TLE";

		for(int i = 0; i < N; i++){
			int c = sc.nextInt();
			int t = sc.nextInt(); 

			if((c < min) && (t <= T)){
				min = c;
				ans = "" + c;
			}
		}
		System.out.println(ans);


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

		int N = sc.nextInt();
		int T = sc.nextInt();
		int min = 1001;
		String ans = "TLE";

		for(int i = 0; i < N; i++){
			int c = sc.nextInt();
			int t = sc.nextInt(); 

			if((c < min) && (t <= T)){
				min = c;
				ans = "" + c;
			}
		}
		System.out.println(ans);


	} main {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int T = sc.nextInt();
		int min = 1001;
		String ans = "TLE";

		for(int i = 0; i < N; i++){
			int c = sc.nextInt();
			int t = sc.nextInt(); 

			if((c < min) && (t <= T)){
				min = c;
				ans = "" + c;
			}
		}
		System.out.println(ans);


	} 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 min = 1001; min 1001 String ans = "TLE"; ans "TLE" for(int i = 0; i < N; i++){
			int c = sc.nextInt();
			int t = sc.nextInt(); 

			if((c < min) && (t <= T)){
				min = c;
				ans = "" + c;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int c = sc.nextInt();
			int t = sc.nextInt(); 

			if((c < min) && (t <= T)){
				min = c;
				ans = "" + c;
			}
		} {
			int c = sc.nextInt();
			int t = sc.nextInt(); 

			if((c < min) && (t <= T)){
				min = c;
				ans = "" + c;
			}
		} int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int t = sc.nextInt(); t sc.nextInt() sc.nextInt sc if((c < min) && (t <= T)){
				min = c;
				ans = "" + c;
			} (c < min) && (t <= T) (c < min) c min (t <= T) t T {
				min = c;
				ans = "" + c;
			} min = c min c ans = "" + c ans "" + c "" c System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;

class Main{

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

		int N = sc.nextInt();
		int T = sc.nextInt();
		int min = 1001;
		String ans = "TLE";

		for(int i = 0; i < N; i++){
			int c = sc.nextInt();
			int t = sc.nextInt(); 

			if((c < min) && (t <= T)){
				min = c;
				ans = "" + c;
			}
		}
		System.out.println(ans);


	}
}