import java.util.Arrays;
import java.util.Scanner;

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

		int N = sc.nextInt();
		int T = sc.nextInt();

		int[] cs = new int[N];
		for (int i = 0; i < N; i++) {
			int c = sc.nextInt();
			if (sc.nextInt() <= T) {
				cs[i] = c;
			} else {
				cs[i] = 1001;
			}
		}
		Arrays.sort(cs);

		System.out.println(cs[0] <= 1000 ? cs[0] : "TLE");

		sc.close();
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int T = sc.nextInt();

		int[] cs = new int[N];
		for (int i = 0; i < N; i++) {
			int c = sc.nextInt();
			if (sc.nextInt() <= T) {
				cs[i] = c;
			} else {
				cs[i] = 1001;
			}
		}
		Arrays.sort(cs);

		System.out.println(cs[0] <= 1000 ? cs[0] : "TLE");

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

		int N = sc.nextInt();
		int T = sc.nextInt();

		int[] cs = new int[N];
		for (int i = 0; i < N; i++) {
			int c = sc.nextInt();
			if (sc.nextInt() <= T) {
				cs[i] = c;
			} else {
				cs[i] = 1001;
			}
		}
		Arrays.sort(cs);

		System.out.println(cs[0] <= 1000 ? cs[0] : "TLE");

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

		int N = sc.nextInt();
		int T = sc.nextInt();

		int[] cs = new int[N];
		for (int i = 0; i < N; i++) {
			int c = sc.nextInt();
			if (sc.nextInt() <= T) {
				cs[i] = c;
			} else {
				cs[i] = 1001;
			}
		}
		Arrays.sort(cs);

		System.out.println(cs[0] <= 1000 ? cs[0] : "TLE");

		sc.close();
	} 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[] cs = new int[N]; cs new int[N] N for (int i = 0; i < N; i++) {
			int c = sc.nextInt();
			if (sc.nextInt() <= T) {
				cs[i] = c;
			} else {
				cs[i] = 1001;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int c = sc.nextInt();
			if (sc.nextInt() <= T) {
				cs[i] = c;
			} else {
				cs[i] = 1001;
			}
		} {
			int c = sc.nextInt();
			if (sc.nextInt() <= T) {
				cs[i] = c;
			} else {
				cs[i] = 1001;
			}
		} int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc if (sc.nextInt() <= T) {
				cs[i] = c;
			} else {
				cs[i] = 1001;
			} sc.nextInt() <= T sc.nextInt() sc.nextInt sc T {
				cs[i] = c;
			} cs[i] = c cs[i] cs i c {
				cs[i] = 1001;
			} cs[i] = 1001 cs[i] cs i 1001 Arrays.sort(cs) Arrays.sort Arrays cs System.out.println(cs[0] <= 1000 ? cs[0] : "TLE") System.out.println System.out System System.out cs[0] <= 1000 ? cs[0] : "TLE" cs[0] <= 1000 cs[0] cs 0 1000 cs[0] cs 0 "TLE" sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int T = sc.nextInt();

		int[] cs = new int[N];
		for (int i = 0; i < N; i++) {
			int c = sc.nextInt();
			if (sc.nextInt() <= T) {
				cs[i] = c;
			} else {
				cs[i] = 1001;
			}
		}
		Arrays.sort(cs);

		System.out.println(cs[0] <= 1000 ? cs[0] : "TLE");

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

		int N = sc.nextInt();
		int T = sc.nextInt();

		int[] cs = new int[N];
		for (int i = 0; i < N; i++) {
			int c = sc.nextInt();
			if (sc.nextInt() <= T) {
				cs[i] = c;
			} else {
				cs[i] = 1001;
			}
		}
		Arrays.sort(cs);

		System.out.println(cs[0] <= 1000 ? cs[0] : "TLE");

		sc.close();
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

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

		int N = sc.nextInt();
		int T = sc.nextInt();

		int[] cs = new int[N];
		for (int i = 0; i < N; i++) {
			int c = sc.nextInt();
			if (sc.nextInt() <= T) {
				cs[i] = c;
			} else {
				cs[i] = 1001;
			}
		}
		Arrays.sort(cs);

		System.out.println(cs[0] <= 1000 ? cs[0] : "TLE");

		sc.close();
	}
}
