import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int N = reader.nextInt();
		int T = reader.nextInt();
		int min = 1000;
		String result = "TLE";
		for (int i = 0; i < N; i++) {
			int A = reader.nextInt();
			int B = reader.nextInt();
			if (B <= T && A <= min) {
				min = A;
				result = Integer.toString(min);
			}
		}

		reader.close();
		System.out.print(result);
	}
}
 import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int N = reader.nextInt();
		int T = reader.nextInt();
		int min = 1000;
		String result = "TLE";
		for (int i = 0; i < N; i++) {
			int A = reader.nextInt();
			int B = reader.nextInt();
			if (B <= T && A <= min) {
				min = A;
				result = Integer.toString(min);
			}
		}

		reader.close();
		System.out.print(result);
	}
} Main public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int N = reader.nextInt();
		int T = reader.nextInt();
		int min = 1000;
		String result = "TLE";
		for (int i = 0; i < N; i++) {
			int A = reader.nextInt();
			int B = reader.nextInt();
			if (B <= T && A <= min) {
				min = A;
				result = Integer.toString(min);
			}
		}

		reader.close();
		System.out.print(result);
	} main {
		Scanner reader = new Scanner(System.in);
		int N = reader.nextInt();
		int T = reader.nextInt();
		int min = 1000;
		String result = "TLE";
		for (int i = 0; i < N; i++) {
			int A = reader.nextInt();
			int B = reader.nextInt();
			if (B <= T && A <= min) {
				min = A;
				result = Integer.toString(min);
			}
		}

		reader.close();
		System.out.print(result);
	} Scanner reader = new Scanner(System.in); reader new Scanner(System.in) int N = reader.nextInt(); N reader.nextInt() reader.nextInt reader int T = reader.nextInt(); T reader.nextInt() reader.nextInt reader int min = 1000; min 1000 String result = "TLE"; result "TLE" for (int i = 0; i < N; i++) {
			int A = reader.nextInt();
			int B = reader.nextInt();
			if (B <= T && A <= min) {
				min = A;
				result = Integer.toString(min);
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int A = reader.nextInt();
			int B = reader.nextInt();
			if (B <= T && A <= min) {
				min = A;
				result = Integer.toString(min);
			}
		} {
			int A = reader.nextInt();
			int B = reader.nextInt();
			if (B <= T && A <= min) {
				min = A;
				result = Integer.toString(min);
			}
		} int A = reader.nextInt(); A reader.nextInt() reader.nextInt reader int B = reader.nextInt(); B reader.nextInt() reader.nextInt reader if (B <= T && A <= min) {
				min = A;
				result = Integer.toString(min);
			} B <= T && A <= min B <= T B T A <= min A min {
				min = A;
				result = Integer.toString(min);
			} min = A min A result = Integer.toString(min) result Integer.toString(min) Integer.toString Integer min reader.close() reader.close reader System.out.print(result) System.out.print System.out System System.out result String[] args args public class Main {
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int N = reader.nextInt();
		int T = reader.nextInt();
		int min = 1000;
		String result = "TLE";
		for (int i = 0; i < N; i++) {
			int A = reader.nextInt();
			int B = reader.nextInt();
			if (B <= T && A <= min) {
				min = A;
				result = Integer.toString(min);
			}
		}

		reader.close();
		System.out.print(result);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int N = reader.nextInt();
		int T = reader.nextInt();
		int min = 1000;
		String result = "TLE";
		for (int i = 0; i < N; i++) {
			int A = reader.nextInt();
			int B = reader.nextInt();
			if (B <= T && A <= min) {
				min = A;
				result = Integer.toString(min);
			}
		}

		reader.close();
		System.out.print(result);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int N = reader.nextInt();
		int T = reader.nextInt();
		int min = 1000;
		String result = "TLE";
		for (int i = 0; i < N; i++) {
			int A = reader.nextInt();
			int B = reader.nextInt();
			if (B <= T && A <= min) {
				min = A;
				result = Integer.toString(min);
			}
		}

		reader.close();
		System.out.print(result);
	}
}

