import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int t = sc.nextInt();
		int[][] a = new int[n][2];

		for(int i=0; i<n; i++){
			a[i][0] = sc.nextInt();
			a[i][1] = sc.nextInt(); 
		}

		int min=1001;

		for(int i=0; i<n; i++){
			if(a[i][1] <= t){
				if(a[i][0] < min){
					min = a[i][0];
				}
			}
		}

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

	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int t = sc.nextInt();
		int[][] a = new int[n][2];

		for(int i=0; i<n; i++){
			a[i][0] = sc.nextInt();
			a[i][1] = sc.nextInt(); 
		}

		int min=1001;

		for(int i=0; i<n; i++){
			if(a[i][1] <= t){
				if(a[i][0] < min){
					min = a[i][0];
				}
			}
		}

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

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int t = sc.nextInt();
		int[][] a = new int[n][2];

		for(int i=0; i<n; i++){
			a[i][0] = sc.nextInt();
			a[i][1] = sc.nextInt(); 
		}

		int min=1001;

		for(int i=0; i<n; i++){
			if(a[i][1] <= t){
				if(a[i][0] < min){
					min = a[i][0];
				}
			}
		}

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

	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int t = sc.nextInt();
		int[][] a = new int[n][2];

		for(int i=0; i<n; i++){
			a[i][0] = sc.nextInt();
			a[i][1] = sc.nextInt(); 
		}

		int min=1001;

		for(int i=0; i<n; i++){
			if(a[i][1] <= t){
				if(a[i][0] < min){
					min = a[i][0];
				}
			}
		}

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

	} 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[][] a = new int[n][2]; a new int[n][2] n 2 for(int i=0; i<n; i++){
			a[i][0] = sc.nextInt();
			a[i][1] = sc.nextInt(); 
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			a[i][0] = sc.nextInt();
			a[i][1] = sc.nextInt(); 
		} {
			a[i][0] = sc.nextInt();
			a[i][1] = sc.nextInt(); 
		} a[i][0] = sc.nextInt() a[i][0] a[i] a i 0 sc.nextInt() sc.nextInt sc a[i][1] = sc.nextInt() a[i][1] a[i] a i 1 sc.nextInt() sc.nextInt sc int min=1001; min 1001 for(int i=0; i<n; i++){
			if(a[i][1] <= t){
				if(a[i][0] < min){
					min = a[i][0];
				}
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			if(a[i][1] <= t){
				if(a[i][0] < min){
					min = a[i][0];
				}
			}
		} {
			if(a[i][1] <= t){
				if(a[i][0] < min){
					min = a[i][0];
				}
			}
		} if(a[i][1] <= t){
				if(a[i][0] < min){
					min = a[i][0];
				}
			} a[i][1] <= t a[i][1] a[i] a i 1 t {
				if(a[i][0] < min){
					min = a[i][0];
				}
			} if(a[i][0] < min){
					min = a[i][0];
				} a[i][0] < min a[i][0] a[i] a i 0 min {
					min = a[i][0];
				} min = a[i][0] min a[i][0] a[i] a i 0 if(min == 1001){
			System.out.println("TLE");
		}else{
			System.out.println(min);
		} min == 1001 min 1001 {
			System.out.println("TLE");
		} System.out.println("TLE") System.out.println System.out System System.out "TLE" {
			System.out.println(min);
		} System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int t = sc.nextInt();
		int[][] a = new int[n][2];

		for(int i=0; i<n; i++){
			a[i][0] = sc.nextInt();
			a[i][1] = sc.nextInt(); 
		}

		int min=1001;

		for(int i=0; i<n; i++){
			if(a[i][1] <= t){
				if(a[i][0] < min){
					min = a[i][0];
				}
			}
		}

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

	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int t = sc.nextInt();
		int[][] a = new int[n][2];

		for(int i=0; i<n; i++){
			a[i][0] = sc.nextInt();
			a[i][1] = sc.nextInt(); 
		}

		int min=1001;

		for(int i=0; i<n; i++){
			if(a[i][1] <= t){
				if(a[i][0] < min){
					min = a[i][0];
				}
			}
		}

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

	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int t = sc.nextInt();
		int[][] a = new int[n][2];

		for(int i=0; i<n; i++){
			a[i][0] = sc.nextInt();
			a[i][1] = sc.nextInt(); 
		}

		int min=1001;

		for(int i=0; i<n; i++){
			if(a[i][1] <= t){
				if(a[i][0] < min){
					min = a[i][0];
				}
			}
		}

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

	}
}