import java.util.Scanner;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int cost = 1001;
		Scanner scanner = new Scanner(System.in);
		String NT[] = scanner.nextLine().split(" ",0);
		int N = Integer.parseInt(NT[0]);
		int T = Integer.parseInt(NT[1]);

		for(int i = 0; i < N; i++){
			scanner.hasNextLine();
			String nt[] = scanner.nextLine().split(" ",0);
			int n = Integer.parseInt(nt[0]);
			int t = Integer.parseInt(nt[1]);
			if(t <= T & n <= cost){
				cost = n;
			}
		}
		if(cost == 1001){
			System.out.print("TLE");
		}else{
			System.out.print(cost);
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int cost = 1001;
		Scanner scanner = new Scanner(System.in);
		String NT[] = scanner.nextLine().split(" ",0);
		int N = Integer.parseInt(NT[0]);
		int T = Integer.parseInt(NT[1]);

		for(int i = 0; i < N; i++){
			scanner.hasNextLine();
			String nt[] = scanner.nextLine().split(" ",0);
			int n = Integer.parseInt(nt[0]);
			int t = Integer.parseInt(nt[1]);
			if(t <= T & n <= cost){
				cost = n;
			}
		}
		if(cost == 1001){
			System.out.print("TLE");
		}else{
			System.out.print(cost);
		}
	}

} Main /**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int cost = 1001;
		Scanner scanner = new Scanner(System.in);
		String NT[] = scanner.nextLine().split(" ",0);
		int N = Integer.parseInt(NT[0]);
		int T = Integer.parseInt(NT[1]);

		for(int i = 0; i < N; i++){
			scanner.hasNextLine();
			String nt[] = scanner.nextLine().split(" ",0);
			int n = Integer.parseInt(nt[0]);
			int t = Integer.parseInt(nt[1]);
			if(t <= T & n <= cost){
				cost = n;
			}
		}
		if(cost == 1001){
			System.out.print("TLE");
		}else{
			System.out.print(cost);
		}
	} main {
		// TODO 自動生成されたメソッド・スタブ
		int cost = 1001;
		Scanner scanner = new Scanner(System.in);
		String NT[] = scanner.nextLine().split(" ",0);
		int N = Integer.parseInt(NT[0]);
		int T = Integer.parseInt(NT[1]);

		for(int i = 0; i < N; i++){
			scanner.hasNextLine();
			String nt[] = scanner.nextLine().split(" ",0);
			int n = Integer.parseInt(nt[0]);
			int t = Integer.parseInt(nt[1]);
			if(t <= T & n <= cost){
				cost = n;
			}
		}
		if(cost == 1001){
			System.out.print("TLE");
		}else{
			System.out.print(cost);
		}
	} int cost = 1001; cost 1001 Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String NT[] = scanner.nextLine().split(" ",0); NT scanner.nextLine().split(" ",0) scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " 0 int N = Integer.parseInt(NT[0]); N Integer.parseInt(NT[0]) Integer.parseInt Integer NT[0] NT 0 int T = Integer.parseInt(NT[1]); T Integer.parseInt(NT[1]) Integer.parseInt Integer NT[1] NT 1 for(int i = 0; i < N; i++){
			scanner.hasNextLine();
			String nt[] = scanner.nextLine().split(" ",0);
			int n = Integer.parseInt(nt[0]);
			int t = Integer.parseInt(nt[1]);
			if(t <= T & n <= cost){
				cost = n;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			scanner.hasNextLine();
			String nt[] = scanner.nextLine().split(" ",0);
			int n = Integer.parseInt(nt[0]);
			int t = Integer.parseInt(nt[1]);
			if(t <= T & n <= cost){
				cost = n;
			}
		} {
			scanner.hasNextLine();
			String nt[] = scanner.nextLine().split(" ",0);
			int n = Integer.parseInt(nt[0]);
			int t = Integer.parseInt(nt[1]);
			if(t <= T & n <= cost){
				cost = n;
			}
		} scanner.hasNextLine() scanner.hasNextLine scanner String nt[] = scanner.nextLine().split(" ",0); nt scanner.nextLine().split(" ",0) scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " 0 int n = Integer.parseInt(nt[0]); n Integer.parseInt(nt[0]) Integer.parseInt Integer nt[0] nt 0 int t = Integer.parseInt(nt[1]); t Integer.parseInt(nt[1]) Integer.parseInt Integer nt[1] nt 1 if(t <= T & n <= cost){
				cost = n;
			} t <= T & n <= cost t <= T t T n <= cost n cost {
				cost = n;
			} cost = n cost n if(cost == 1001){
			System.out.print("TLE");
		}else{
			System.out.print(cost);
		} cost == 1001 cost 1001 {
			System.out.print("TLE");
		} System.out.print("TLE") System.out.print System.out System System.out "TLE" {
			System.out.print(cost);
		} System.out.print(cost) System.out.print System.out System System.out cost String[] args args public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int cost = 1001;
		Scanner scanner = new Scanner(System.in);
		String NT[] = scanner.nextLine().split(" ",0);
		int N = Integer.parseInt(NT[0]);
		int T = Integer.parseInt(NT[1]);

		for(int i = 0; i < N; i++){
			scanner.hasNextLine();
			String nt[] = scanner.nextLine().split(" ",0);
			int n = Integer.parseInt(nt[0]);
			int t = Integer.parseInt(nt[1]);
			if(t <= T & n <= cost){
				cost = n;
			}
		}
		if(cost == 1001){
			System.out.print("TLE");
		}else{
			System.out.print(cost);
		}
	}

} public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int cost = 1001;
		Scanner scanner = new Scanner(System.in);
		String NT[] = scanner.nextLine().split(" ",0);
		int N = Integer.parseInt(NT[0]);
		int T = Integer.parseInt(NT[1]);

		for(int i = 0; i < N; i++){
			scanner.hasNextLine();
			String nt[] = scanner.nextLine().split(" ",0);
			int n = Integer.parseInt(nt[0]);
			int t = Integer.parseInt(nt[1]);
			if(t <= T & n <= cost){
				cost = n;
			}
		}
		if(cost == 1001){
			System.out.print("TLE");
		}else{
			System.out.print(cost);
		}
	}

} Main
import java.util.Scanner;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		int cost = 1001;
		Scanner scanner = new Scanner(System.in);
		String NT[] = scanner.nextLine().split(" ",0);
		int N = Integer.parseInt(NT[0]);
		int T = Integer.parseInt(NT[1]);

		for(int i = 0; i < N; i++){
			scanner.hasNextLine();
			String nt[] = scanner.nextLine().split(" ",0);
			int n = Integer.parseInt(nt[0]);
			int t = Integer.parseInt(nt[1]);
			if(t <= T & n <= cost){
				cost = n;
			}
		}
		if(cost == 1001){
			System.out.print("TLE");
		}else{
			System.out.print(cost);
		}
	}

}
