import java.util.Scanner;

class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int t = sc.nextInt();
		int c[] = new int[n];
		int tn[] = new int[n];
		int cm=1001,tm=1001;
		for(int i= 0;i<n;i++){
			c[i]=sc.nextInt();
			tn[i]=sc.nextInt();
			if(cm>c[i]&&t>=tn[i]){
				cm=c[i];
				tm=tn[i];
			}

		}
		if(tm==1001){
			System.out.println("TLE");
		}else{
			System.out.println(cm);
		}
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int t = sc.nextInt();
		int c[] = new int[n];
		int tn[] = new int[n];
		int cm=1001,tm=1001;
		for(int i= 0;i<n;i++){
			c[i]=sc.nextInt();
			tn[i]=sc.nextInt();
			if(cm>c[i]&&t>=tn[i]){
				cm=c[i];
				tm=tn[i];
			}

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

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

		}
		if(tm==1001){
			System.out.println("TLE");
		}else{
			System.out.println(cm);
		}
	} 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 c[] = new int[n]; c new int[n] n int tn[] = new int[n]; tn new int[n] n int cm=1001 cm 1001 tm=1001; tm 1001 for(int i= 0;i<n;i++){
			c[i]=sc.nextInt();
			tn[i]=sc.nextInt();
			if(cm>c[i]&&t>=tn[i]){
				cm=c[i];
				tm=tn[i];
			}

		} int i= 0; int i= 0; i 0 i<n i n i++ i++ i {
			c[i]=sc.nextInt();
			tn[i]=sc.nextInt();
			if(cm>c[i]&&t>=tn[i]){
				cm=c[i];
				tm=tn[i];
			}

		} {
			c[i]=sc.nextInt();
			tn[i]=sc.nextInt();
			if(cm>c[i]&&t>=tn[i]){
				cm=c[i];
				tm=tn[i];
			}

		} c[i]=sc.nextInt() c[i] c i sc.nextInt() sc.nextInt sc tn[i]=sc.nextInt() tn[i] tn i sc.nextInt() sc.nextInt sc if(cm>c[i]&&t>=tn[i]){
				cm=c[i];
				tm=tn[i];
			} cm>c[i]&&t>=tn[i] cm>c[i] cm c[i] c i t>=tn[i] t tn[i] tn i {
				cm=c[i];
				tm=tn[i];
			} cm=c[i] cm c[i] c i tm=tn[i] tm tn[i] tn i if(tm==1001){
			System.out.println("TLE");
		}else{
			System.out.println(cm);
		} tm==1001 tm 1001 {
			System.out.println("TLE");
		} System.out.println("TLE") System.out.println System.out System System.out "TLE" {
			System.out.println(cm);
		} System.out.println(cm) System.out.println System.out System System.out cm String args[] args
import java.util.Scanner;

class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int t = sc.nextInt();
		int c[] = new int[n];
		int tn[] = new int[n];
		int cm=1001,tm=1001;
		for(int i= 0;i<n;i++){
			c[i]=sc.nextInt();
			tn[i]=sc.nextInt();
			if(cm>c[i]&&t>=tn[i]){
				cm=c[i];
				tm=tn[i];
			}

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