import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int limitC = sc.nextInt();
		int limitT = sc.nextInt();
		int[][] routeOption = new int[2][1000];
		int ans = 1010;
		while(sc.hasNext() == true){
			int optionC = sc.nextInt();
			int optionT = sc.nextInt();
			if(optionT <= limitT){
				ans = Math.min(ans, optionC);
			}
		}
		if(ans == 1010){
			System.out.println("TLE");
		}else{
			System.out.println(ans);
		}
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int limitC = sc.nextInt();
		int limitT = sc.nextInt();
		int[][] routeOption = new int[2][1000];
		int ans = 1010;
		while(sc.hasNext() == true){
			int optionC = sc.nextInt();
			int optionT = sc.nextInt();
			if(optionT <= limitT){
				ans = Math.min(ans, optionC);
			}
		}
		if(ans == 1010){
			System.out.println("TLE");
		}else{
			System.out.println(ans);
		}
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int limitC = sc.nextInt();
		int limitT = sc.nextInt();
		int[][] routeOption = new int[2][1000];
		int ans = 1010;
		while(sc.hasNext() == true){
			int optionC = sc.nextInt();
			int optionT = sc.nextInt();
			if(optionT <= limitT){
				ans = Math.min(ans, optionC);
			}
		}
		if(ans == 1010){
			System.out.println("TLE");
		}else{
			System.out.println(ans);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int limitC = sc.nextInt();
		int limitT = sc.nextInt();
		int[][] routeOption = new int[2][1000];
		int ans = 1010;
		while(sc.hasNext() == true){
			int optionC = sc.nextInt();
			int optionT = sc.nextInt();
			if(optionT <= limitT){
				ans = Math.min(ans, optionC);
			}
		}
		if(ans == 1010){
			System.out.println("TLE");
		}else{
			System.out.println(ans);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int limitC = sc.nextInt(); limitC sc.nextInt() sc.nextInt sc int limitT = sc.nextInt(); limitT sc.nextInt() sc.nextInt sc int[][] routeOption = new int[2][1000]; routeOption new int[2][1000] 2 1000 int ans = 1010; ans 1010 while(sc.hasNext() == true){
			int optionC = sc.nextInt();
			int optionT = sc.nextInt();
			if(optionT <= limitT){
				ans = Math.min(ans, optionC);
			}
		} sc.hasNext() == true sc.hasNext() sc.hasNext sc true {
			int optionC = sc.nextInt();
			int optionT = sc.nextInt();
			if(optionT <= limitT){
				ans = Math.min(ans, optionC);
			}
		} int optionC = sc.nextInt(); optionC sc.nextInt() sc.nextInt sc int optionT = sc.nextInt(); optionT sc.nextInt() sc.nextInt sc if(optionT <= limitT){
				ans = Math.min(ans, optionC);
			} optionT <= limitT optionT limitT {
				ans = Math.min(ans, optionC);
			} ans = Math.min(ans, optionC) ans Math.min(ans, optionC) Math.min Math ans optionC if(ans == 1010){
			System.out.println("TLE");
		}else{
			System.out.println(ans);
		} ans == 1010 ans 1010 {
			System.out.println("TLE");
		} System.out.println("TLE") System.out.println System.out System System.out "TLE" {
			System.out.println(ans);
		} System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int limitC = sc.nextInt();
		int limitT = sc.nextInt();
		int[][] routeOption = new int[2][1000];
		int ans = 1010;
		while(sc.hasNext() == true){
			int optionC = sc.nextInt();
			int optionT = sc.nextInt();
			if(optionT <= limitT){
				ans = Math.min(ans, optionC);
			}
		}
		if(ans == 1010){
			System.out.println("TLE");
		}else{
			System.out.println(ans);
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int limitC = sc.nextInt();
		int limitT = sc.nextInt();
		int[][] routeOption = new int[2][1000];
		int ans = 1010;
		while(sc.hasNext() == true){
			int optionC = sc.nextInt();
			int optionT = sc.nextInt();
			if(optionT <= limitT){
				ans = Math.min(ans, optionC);
			}
		}
		if(ans == 1010){
			System.out.println("TLE");
		}else{
			System.out.println(ans);
		}
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int limitC = sc.nextInt();
		int limitT = sc.nextInt();
		int[][] routeOption = new int[2][1000];
		int ans = 1010;
		while(sc.hasNext() == true){
			int optionC = sc.nextInt();
			int optionT = sc.nextInt();
			if(optionT <= limitT){
				ans = Math.min(ans, optionC);
			}
		}
		if(ans == 1010){
			System.out.println("TLE");
		}else{
			System.out.println(ans);
		}
	}

}
