import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int 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();
		}
		scan.close();
		int min = Integer.MAX_VALUE;
		for(int i = 0; i < N; i++) {
			if(t[i] <= T) {
				min = Math.min(min, c[i]);
			}
		}
		if(min != Integer.MAX_VALUE) {
			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 = scan.nextInt();
		int 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();
		}
		scan.close();
		int min = Integer.MAX_VALUE;
		for(int i = 0; i < N; i++) {
			if(t[i] <= T) {
				min = Math.min(min, c[i]);
			}
		}
		if(min != Integer.MAX_VALUE) {
			System.out.println(min);
		}else {
			System.out.println("TLE");
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int 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();
		}
		scan.close();
		int min = Integer.MAX_VALUE;
		for(int i = 0; i < N; i++) {
			if(t[i] <= T) {
				min = Math.min(min, c[i]);
			}
		}
		if(min != Integer.MAX_VALUE) {
			System.out.println(min);
		}else {
			System.out.println("TLE");
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int 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();
		}
		scan.close();
		int min = Integer.MAX_VALUE;
		for(int i = 0; i < N; i++) {
			if(t[i] <= T) {
				min = Math.min(min, c[i]);
			}
		}
		if(min != Integer.MAX_VALUE) {
			System.out.println(min);
		}else {
			System.out.println("TLE");
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int 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 scan.close() scan.close scan int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i = 0; i < N; i++) {
			if(t[i] <= T) {
				min = Math.min(min, c[i]);
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			if(t[i] <= T) {
				min = Math.min(min, c[i]);
			}
		} {
			if(t[i] <= T) {
				min = Math.min(min, c[i]);
			}
		} if(t[i] <= T) {
				min = Math.min(min, c[i]);
			} t[i] <= T t[i] t i T {
				min = Math.min(min, c[i]);
			} min = Math.min(min, c[i]) min Math.min(min, c[i]) Math.min Math min c[i] c i if(min != Integer.MAX_VALUE) {
			System.out.println(min);
		}else {
			System.out.println("TLE");
		} min != Integer.MAX_VALUE min Integer.MAX_VALUE Integer Integer.MAX_VALUE {
			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 = scan.nextInt();
		int 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();
		}
		scan.close();
		int min = Integer.MAX_VALUE;
		for(int i = 0; i < N; i++) {
			if(t[i] <= T) {
				min = Math.min(min, c[i]);
			}
		}
		if(min != Integer.MAX_VALUE) {
			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 = scan.nextInt();
		int 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();
		}
		scan.close();
		int min = Integer.MAX_VALUE;
		for(int i = 0; i < N; i++) {
			if(t[i] <= T) {
				min = Math.min(min, c[i]);
			}
		}
		if(min != Integer.MAX_VALUE) {
			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 = scan.nextInt();
		int 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();
		}
		scan.close();
		int min = Integer.MAX_VALUE;
		for(int i = 0; i < N; i++) {
			if(t[i] <= T) {
				min = Math.min(min, c[i]);
			}
		}
		if(min != Integer.MAX_VALUE) {
			System.out.println(min);
		}else {
			System.out.println("TLE");
		}
	}
}