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 x[]=new int[1001];
		
		for(int i=0;i<1001;i++) {
			x[i]=10000;
		}
		
		
		for(int i=0;i<N;i++) {
			int a=in.nextInt();
			x[a]=in.nextInt();
		}
		int min=10000;
		int minnb=10000;
		
		for(int i=1;i<1001;i++) {
			if(x[i]<=T) {
				minnb=Math.min(minnb, i);
			}
		}
		
		if(minnb==10000) {
			System.out.println("TLE");
		}else {
			System.out.println(minnb);
		}
		

	}
} 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 x[]=new int[1001];
		
		for(int i=0;i<1001;i++) {
			x[i]=10000;
		}
		
		
		for(int i=0;i<N;i++) {
			int a=in.nextInt();
			x[a]=in.nextInt();
		}
		int min=10000;
		int minnb=10000;
		
		for(int i=1;i<1001;i++) {
			if(x[i]<=T) {
				minnb=Math.min(minnb, i);
			}
		}
		
		if(minnb==10000) {
			System.out.println("TLE");
		}else {
			System.out.println(minnb);
		}
		

	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int T = in.nextInt();
		int x[]=new int[1001];
		
		for(int i=0;i<1001;i++) {
			x[i]=10000;
		}
		
		
		for(int i=0;i<N;i++) {
			int a=in.nextInt();
			x[a]=in.nextInt();
		}
		int min=10000;
		int minnb=10000;
		
		for(int i=1;i<1001;i++) {
			if(x[i]<=T) {
				minnb=Math.min(minnb, i);
			}
		}
		
		if(minnb==10000) {
			System.out.println("TLE");
		}else {
			System.out.println(minnb);
		}
		

	} main {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int T = in.nextInt();
		int x[]=new int[1001];
		
		for(int i=0;i<1001;i++) {
			x[i]=10000;
		}
		
		
		for(int i=0;i<N;i++) {
			int a=in.nextInt();
			x[a]=in.nextInt();
		}
		int min=10000;
		int minnb=10000;
		
		for(int i=1;i<1001;i++) {
			if(x[i]<=T) {
				minnb=Math.min(minnb, i);
			}
		}
		
		if(minnb==10000) {
			System.out.println("TLE");
		}else {
			System.out.println(minnb);
		}
		

	} 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 x[]=new int[1001]; x new int[1001] 1001 for(int i=0;i<1001;i++) {
			x[i]=10000;
		} int i=0; int i=0; i 0 i<1001 i 1001 i++ i++ i {
			x[i]=10000;
		} {
			x[i]=10000;
		} x[i]=10000 x[i] x i 10000 for(int i=0;i<N;i++) {
			int a=in.nextInt();
			x[a]=in.nextInt();
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			int a=in.nextInt();
			x[a]=in.nextInt();
		} {
			int a=in.nextInt();
			x[a]=in.nextInt();
		} int a=in.nextInt(); a in.nextInt() in.nextInt in x[a]=in.nextInt() x[a] x a in.nextInt() in.nextInt in int min=10000; min 10000 int minnb=10000; minnb 10000 for(int i=1;i<1001;i++) {
			if(x[i]<=T) {
				minnb=Math.min(minnb, i);
			}
		} int i=1; int i=1; i 1 i<1001 i 1001 i++ i++ i {
			if(x[i]<=T) {
				minnb=Math.min(minnb, i);
			}
		} {
			if(x[i]<=T) {
				minnb=Math.min(minnb, i);
			}
		} if(x[i]<=T) {
				minnb=Math.min(minnb, i);
			} x[i]<=T x[i] x i T {
				minnb=Math.min(minnb, i);
			} minnb=Math.min(minnb, i) minnb Math.min(minnb, i) Math.min Math minnb i if(minnb==10000) {
			System.out.println("TLE");
		}else {
			System.out.println(minnb);
		} minnb==10000 minnb 10000 {
			System.out.println("TLE");
		} System.out.println("TLE") System.out.println System.out System System.out "TLE" {
			System.out.println(minnb);
		} System.out.println(minnb) System.out.println System.out System System.out minnb 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 x[]=new int[1001];
		
		for(int i=0;i<1001;i++) {
			x[i]=10000;
		}
		
		
		for(int i=0;i<N;i++) {
			int a=in.nextInt();
			x[a]=in.nextInt();
		}
		int min=10000;
		int minnb=10000;
		
		for(int i=1;i<1001;i++) {
			if(x[i]<=T) {
				minnb=Math.min(minnb, i);
			}
		}
		
		if(minnb==10000) {
			System.out.println("TLE");
		}else {
			System.out.println(minnb);
		}
		

	}
} public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int N = in.nextInt();
		int T = in.nextInt();
		int x[]=new int[1001];
		
		for(int i=0;i<1001;i++) {
			x[i]=10000;
		}
		
		
		for(int i=0;i<N;i++) {
			int a=in.nextInt();
			x[a]=in.nextInt();
		}
		int min=10000;
		int minnb=10000;
		
		for(int i=1;i<1001;i++) {
			if(x[i]<=T) {
				minnb=Math.min(minnb, i);
			}
		}
		
		if(minnb==10000) {
			System.out.println("TLE");
		}else {
			System.out.println(minnb);
		}
		

	}
} 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 x[]=new int[1001];
		
		for(int i=0;i<1001;i++) {
			x[i]=10000;
		}
		
		
		for(int i=0;i<N;i++) {
			int a=in.nextInt();
			x[a]=in.nextInt();
		}
		int min=10000;
		int minnb=10000;
		
		for(int i=1;i<1001;i++) {
			if(x[i]<=T) {
				minnb=Math.min(minnb, i);
			}
		}
		
		if(minnb==10000) {
			System.out.println("TLE");
		}else {
			System.out.println(minnb);
		}
		

	}
}