import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int t = in.nextInt();
		int[] c = new int[n];
		int[] tn = new int[n];
		for(int i = 0; i < n; i++){
			c[i] = in.nextInt();
			tn[i] = in.nextInt();
		}
		int result = 1001;
		
		for(int i = 0; i < n; i++){
			if(tn[i] <= t && c[i] < result)
				result = c[i];
		}
		
		if(result == 1001)
			System.out.println("TLE");
		else
			System.out.println(result);

	}

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

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int t = in.nextInt();
		int[] c = new int[n];
		int[] tn = new int[n];
		for(int i = 0; i < n; i++){
			c[i] = in.nextInt();
			tn[i] = in.nextInt();
		}
		int result = 1001;
		
		for(int i = 0; i < n; i++){
			if(tn[i] <= t && c[i] < result)
				result = c[i];
		}
		
		if(result == 1001)
			System.out.println("TLE");
		else
			System.out.println(result);

	}

} Main public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int t = in.nextInt();
		int[] c = new int[n];
		int[] tn = new int[n];
		for(int i = 0; i < n; i++){
			c[i] = in.nextInt();
			tn[i] = in.nextInt();
		}
		int result = 1001;
		
		for(int i = 0; i < n; i++){
			if(tn[i] <= t && c[i] < result)
				result = c[i];
		}
		
		if(result == 1001)
			System.out.println("TLE");
		else
			System.out.println(result);

	} main {
		
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int t = in.nextInt();
		int[] c = new int[n];
		int[] tn = new int[n];
		for(int i = 0; i < n; i++){
			c[i] = in.nextInt();
			tn[i] = in.nextInt();
		}
		int result = 1001;
		
		for(int i = 0; i < n; i++){
			if(tn[i] <= t && c[i] < result)
				result = c[i];
		}
		
		if(result == 1001)
			System.out.println("TLE");
		else
			System.out.println(result);

	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in int t = in.nextInt(); t in.nextInt() in.nextInt in int[] c = new int[n]; c new int[n] n int[] tn = new int[n]; tn new int[n] n for(int i = 0; i < n; i++){
			c[i] = in.nextInt();
			tn[i] = in.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			c[i] = in.nextInt();
			tn[i] = in.nextInt();
		} {
			c[i] = in.nextInt();
			tn[i] = in.nextInt();
		} c[i] = in.nextInt() c[i] c i in.nextInt() in.nextInt in tn[i] = in.nextInt() tn[i] tn i in.nextInt() in.nextInt in int result = 1001; result 1001 for(int i = 0; i < n; i++){
			if(tn[i] <= t && c[i] < result)
				result = c[i];
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			if(tn[i] <= t && c[i] < result)
				result = c[i];
		} {
			if(tn[i] <= t && c[i] < result)
				result = c[i];
		} if(tn[i] <= t && c[i] < result)
				result = c[i]; tn[i] <= t && c[i] < result tn[i] <= t tn[i] tn i t c[i] < result c[i] c i result result = c[i] result c[i] c i if(result == 1001)
			System.out.println("TLE");
		else
			System.out.println(result); result == 1001 result 1001 System.out.println("TLE") System.out.println System.out System System.out "TLE" System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int t = in.nextInt();
		int[] c = new int[n];
		int[] tn = new int[n];
		for(int i = 0; i < n; i++){
			c[i] = in.nextInt();
			tn[i] = in.nextInt();
		}
		int result = 1001;
		
		for(int i = 0; i < n; i++){
			if(tn[i] <= t && c[i] < result)
				result = c[i];
		}
		
		if(result == 1001)
			System.out.println("TLE");
		else
			System.out.println(result);

	}

} public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int t = in.nextInt();
		int[] c = new int[n];
		int[] tn = new int[n];
		for(int i = 0; i < n; i++){
			c[i] = in.nextInt();
			tn[i] = in.nextInt();
		}
		int result = 1001;
		
		for(int i = 0; i < n; i++){
			if(tn[i] <= t && c[i] < result)
				result = c[i];
		}
		
		if(result == 1001)
			System.out.println("TLE");
		else
			System.out.println(result);

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int t = in.nextInt();
		int[] c = new int[n];
		int[] tn = new int[n];
		for(int i = 0; i < n; i++){
			c[i] = in.nextInt();
			tn[i] = in.nextInt();
		}
		int result = 1001;
		
		for(int i = 0; i < n; i++){
			if(tn[i] <= t && c[i] < result)
				result = c[i];
		}
		
		if(result == 1001)
			System.out.println("TLE");
		else
			System.out.println(result);

	}

}