import java.io.File;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.List;
import java.util.Scanner;
 
public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int T = sc.nextInt();
		int cc = 1001;
		
		for(int i = 0; i < N; i++){
			int c = sc.nextInt();
			int t = sc.nextInt();
			if(t > T) continue;
			if(c < cc) cc = c;
		}
		
      	if(cc == 1001) System.out.println("TLE");
		else System.out.println(cc);
	}
} import java.io.File; File java.io import java.io.IOException; IOException java.io import java.util.ArrayDeque; ArrayDeque java.util import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Comparator; Comparator java.util import java.util.Deque; Deque java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int T = sc.nextInt();
		int cc = 1001;
		
		for(int i = 0; i < N; i++){
			int c = sc.nextInt();
			int t = sc.nextInt();
			if(t > T) continue;
			if(c < cc) cc = c;
		}
		
      	if(cc == 1001) System.out.println("TLE");
		else System.out.println(cc);
	}
} Main public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int T = sc.nextInt();
		int cc = 1001;
		
		for(int i = 0; i < N; i++){
			int c = sc.nextInt();
			int t = sc.nextInt();
			if(t > T) continue;
			if(c < cc) cc = c;
		}
		
      	if(cc == 1001) System.out.println("TLE");
		else System.out.println(cc);
	} main {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int T = sc.nextInt();
		int cc = 1001;
		
		for(int i = 0; i < N; i++){
			int c = sc.nextInt();
			int t = sc.nextInt();
			if(t > T) continue;
			if(c < cc) cc = c;
		}
		
      	if(cc == 1001) System.out.println("TLE");
		else System.out.println(cc);
	} 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 cc = 1001; cc 1001 for(int i = 0; i < N; i++){
			int c = sc.nextInt();
			int t = sc.nextInt();
			if(t > T) continue;
			if(c < cc) cc = c;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int c = sc.nextInt();
			int t = sc.nextInt();
			if(t > T) continue;
			if(c < cc) cc = c;
		} {
			int c = sc.nextInt();
			int t = sc.nextInt();
			if(t > T) continue;
			if(c < cc) cc = c;
		} int c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int t = sc.nextInt(); t sc.nextInt() sc.nextInt sc if(t > T) continue; t > T t T continue; if(c < cc) cc = c; c < cc c cc cc = c cc c if(cc == 1001) System.out.println("TLE");
		else System.out.println(cc); cc == 1001 cc 1001 System.out.println("TLE") System.out.println System.out System System.out "TLE" System.out.println(cc) System.out.println System.out System System.out cc String[] args args public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int T = sc.nextInt();
		int cc = 1001;
		
		for(int i = 0; i < N; i++){
			int c = sc.nextInt();
			int t = sc.nextInt();
			if(t > T) continue;
			if(c < cc) cc = c;
		}
		
      	if(cc == 1001) System.out.println("TLE");
		else System.out.println(cc);
	}
} public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int T = sc.nextInt();
		int cc = 1001;
		
		for(int i = 0; i < N; i++){
			int c = sc.nextInt();
			int t = sc.nextInt();
			if(t > T) continue;
			if(c < cc) cc = c;
		}
		
      	if(cc == 1001) System.out.println("TLE");
		else System.out.println(cc);
	}
} Main
import java.io.File;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.List;
import java.util.Scanner;
 
public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner sc = new Scanner(file);
		
		Scanner sc = new Scanner(System.in);
		
		int N = sc.nextInt();
		int T = sc.nextInt();
		int cc = 1001;
		
		for(int i = 0; i < N; i++){
			int c = sc.nextInt();
			int t = sc.nextInt();
			if(t > T) continue;
			if(c < cc) cc = c;
		}
		
      	if(cc == 1001) System.out.println("TLE");
		else System.out.println(cc);
	}
}