import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int[] c = new int[1000];
		int[] t2 = new int[1000];
		int n = sc.nextInt();
		int t1 = sc.nextInt();
		int count = 1001;
		int answer = 0;
		int i;
		for(i = 0;i < n; i++){
			c[i] = sc.nextInt();
			t2[i] = sc.nextInt();


			if((t2[i] <= t1) && (c[i] < count)){
				answer  = i;
				count = c[i];
			}

		}
		if(count == 1001){
			System.out.println("TLE");
		}else{
			System.out.println(count);
		}
		
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int[] c = new int[1000];
		int[] t2 = new int[1000];
		int n = sc.nextInt();
		int t1 = sc.nextInt();
		int count = 1001;
		int answer = 0;
		int i;
		for(i = 0;i < n; i++){
			c[i] = sc.nextInt();
			t2[i] = sc.nextInt();


			if((t2[i] <= t1) && (c[i] < count)){
				answer  = i;
				count = c[i];
			}

		}
		if(count == 1001){
			System.out.println("TLE");
		}else{
			System.out.println(count);
		}
		
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int[] c = new int[1000];
		int[] t2 = new int[1000];
		int n = sc.nextInt();
		int t1 = sc.nextInt();
		int count = 1001;
		int answer = 0;
		int i;
		for(i = 0;i < n; i++){
			c[i] = sc.nextInt();
			t2[i] = sc.nextInt();


			if((t2[i] <= t1) && (c[i] < count)){
				answer  = i;
				count = c[i];
			}

		}
		if(count == 1001){
			System.out.println("TLE");
		}else{
			System.out.println(count);
		}
		
	} main {
		Scanner sc = new Scanner(System.in);
		
		int[] c = new int[1000];
		int[] t2 = new int[1000];
		int n = sc.nextInt();
		int t1 = sc.nextInt();
		int count = 1001;
		int answer = 0;
		int i;
		for(i = 0;i < n; i++){
			c[i] = sc.nextInt();
			t2[i] = sc.nextInt();


			if((t2[i] <= t1) && (c[i] < count)){
				answer  = i;
				count = c[i];
			}

		}
		if(count == 1001){
			System.out.println("TLE");
		}else{
			System.out.println(count);
		}
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] c = new int[1000]; c new int[1000] 1000 int[] t2 = new int[1000]; t2 new int[1000] 1000 int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int t1 = sc.nextInt(); t1 sc.nextInt() sc.nextInt sc int count = 1001; count 1001 int answer = 0; answer 0 int i; i for(i = 0;i < n; i++){
			c[i] = sc.nextInt();
			t2[i] = sc.nextInt();


			if((t2[i] <= t1) && (c[i] < count)){
				answer  = i;
				count = c[i];
			}

		} i = 0; i = 0 i 0 i < n i n i++ i++ i {
			c[i] = sc.nextInt();
			t2[i] = sc.nextInt();


			if((t2[i] <= t1) && (c[i] < count)){
				answer  = i;
				count = c[i];
			}

		} {
			c[i] = sc.nextInt();
			t2[i] = sc.nextInt();


			if((t2[i] <= t1) && (c[i] < count)){
				answer  = i;
				count = c[i];
			}

		} c[i] = sc.nextInt() c[i] c i sc.nextInt() sc.nextInt sc t2[i] = sc.nextInt() t2[i] t2 i sc.nextInt() sc.nextInt sc if((t2[i] <= t1) && (c[i] < count)){
				answer  = i;
				count = c[i];
			} (t2[i] <= t1) && (c[i] < count) (t2[i] <= t1) t2[i] t2 i t1 (c[i] < count) c[i] c i count {
				answer  = i;
				count = c[i];
			} answer  = i answer i count = c[i] count c[i] c i if(count == 1001){
			System.out.println("TLE");
		}else{
			System.out.println(count);
		} count == 1001 count 1001 {
			System.out.println("TLE");
		} System.out.println("TLE") System.out.println System.out System System.out "TLE" {
			System.out.println(count);
		} System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int[] c = new int[1000];
		int[] t2 = new int[1000];
		int n = sc.nextInt();
		int t1 = sc.nextInt();
		int count = 1001;
		int answer = 0;
		int i;
		for(i = 0;i < n; i++){
			c[i] = sc.nextInt();
			t2[i] = sc.nextInt();


			if((t2[i] <= t1) && (c[i] < count)){
				answer  = i;
				count = c[i];
			}

		}
		if(count == 1001){
			System.out.println("TLE");
		}else{
			System.out.println(count);
		}
		
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int[] c = new int[1000];
		int[] t2 = new int[1000];
		int n = sc.nextInt();
		int t1 = sc.nextInt();
		int count = 1001;
		int answer = 0;
		int i;
		for(i = 0;i < n; i++){
			c[i] = sc.nextInt();
			t2[i] = sc.nextInt();


			if((t2[i] <= t1) && (c[i] < count)){
				answer  = i;
				count = c[i];
			}

		}
		if(count == 1001){
			System.out.println("TLE");
		}else{
			System.out.println(count);
		}
		
	}
} Main
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int[] c = new int[1000];
		int[] t2 = new int[1000];
		int n = sc.nextInt();
		int t1 = sc.nextInt();
		int count = 1001;
		int answer = 0;
		int i;
		for(i = 0;i < n; i++){
			c[i] = sc.nextInt();
			t2[i] = sc.nextInt();


			if((t2[i] <= t1) && (c[i] < count)){
				answer  = i;
				count = c[i];
			}

		}
		if(count == 1001){
			System.out.println("TLE");
		}else{
			System.out.println(count);
		}
		
	}
}
