import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	int n= sc.nextInt(),T=sc.nextInt();
	int min = 1010;


	for(Integer i=0; i<n;i++) {
		int c=sc.nextInt();
		int t=sc.nextInt();

		if(t<=T) {
			if(c<min) {
				min=c;

			}
		}
	}
	System.out.println(min<=1000?min:"TLE");
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	int n= sc.nextInt(),T=sc.nextInt();
	int min = 1010;


	for(Integer i=0; i<n;i++) {
		int c=sc.nextInt();
		int t=sc.nextInt();

		if(t<=T) {
			if(c<min) {
				min=c;

			}
		}
	}
	System.out.println(min<=1000?min:"TLE");
	}
} Main public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	int n= sc.nextInt(),T=sc.nextInt();
	int min = 1010;


	for(Integer i=0; i<n;i++) {
		int c=sc.nextInt();
		int t=sc.nextInt();

		if(t<=T) {
			if(c<min) {
				min=c;

			}
		}
	}
	System.out.println(min<=1000?min:"TLE");
	} main {
	Scanner sc = new Scanner(System.in);

	int n= sc.nextInt(),T=sc.nextInt();
	int min = 1010;


	for(Integer i=0; i<n;i++) {
		int c=sc.nextInt();
		int t=sc.nextInt();

		if(t<=T) {
			if(c<min) {
				min=c;

			}
		}
	}
	System.out.println(min<=1000?min:"TLE");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n= sc.nextInt() n sc.nextInt() sc.nextInt sc T=sc.nextInt(); T sc.nextInt() sc.nextInt sc int min = 1010; min 1010 for(Integer i=0; i<n;i++) {
		int c=sc.nextInt();
		int t=sc.nextInt();

		if(t<=T) {
			if(c<min) {
				min=c;

			}
		}
	} Integer i=0; Integer i=0; i 0 i<n i n i++ i++ i {
		int c=sc.nextInt();
		int t=sc.nextInt();

		if(t<=T) {
			if(c<min) {
				min=c;

			}
		}
	} {
		int c=sc.nextInt();
		int t=sc.nextInt();

		if(t<=T) {
			if(c<min) {
				min=c;

			}
		}
	} int c=sc.nextInt(); c sc.nextInt() sc.nextInt sc int t=sc.nextInt(); t sc.nextInt() sc.nextInt sc if(t<=T) {
			if(c<min) {
				min=c;

			}
		} t<=T t T {
			if(c<min) {
				min=c;

			}
		} if(c<min) {
				min=c;

			} c<min c min {
				min=c;

			} min=c min c System.out.println(min<=1000?min:"TLE") System.out.println System.out System System.out min<=1000?min:"TLE" min<=1000 min 1000 min "TLE" String[] args args public class Main {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	int n= sc.nextInt(),T=sc.nextInt();
	int min = 1010;


	for(Integer i=0; i<n;i++) {
		int c=sc.nextInt();
		int t=sc.nextInt();

		if(t<=T) {
			if(c<min) {
				min=c;

			}
		}
	}
	System.out.println(min<=1000?min:"TLE");
	}
} public class Main {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	int n= sc.nextInt(),T=sc.nextInt();
	int min = 1010;


	for(Integer i=0; i<n;i++) {
		int c=sc.nextInt();
		int t=sc.nextInt();

		if(t<=T) {
			if(c<min) {
				min=c;

			}
		}
	}
	System.out.println(min<=1000?min:"TLE");
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	int n= sc.nextInt(),T=sc.nextInt();
	int min = 1010;


	for(Integer i=0; i<n;i++) {
		int c=sc.nextInt();
		int t=sc.nextInt();

		if(t<=T) {
			if(c<min) {
				min=c;

			}
		}
	}
	System.out.println(min<=1000?min:"TLE");
	}
}