import java.util.*;


class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner in=new Scanner(System.in);
		int N=in.nextInt();
		int T=in.nextInt();
		
		int com=1001;
		while(in.hasNext()){
		    int n=in.nextInt();
		    int t=in.nextInt();
		    if(t>T)
		        continue;
		    else
		    {
		       if(n<=com) com=n;
		       
		    }     
		       
		}
	
		if(com==1001) System.out.println("TLE");
		else System.out.println(com);
		
	}
} import java.util.*; util.* java class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner in=new Scanner(System.in);
		int N=in.nextInt();
		int T=in.nextInt();
		
		int com=1001;
		while(in.hasNext()){
		    int n=in.nextInt();
		    int t=in.nextInt();
		    if(t>T)
		        continue;
		    else
		    {
		       if(n<=com) com=n;
		       
		    }     
		       
		}
	
		if(com==1001) System.out.println("TLE");
		else System.out.println(com);
		
	}
} Main public static void main (String[] args) throws java.lang.Exception
	{
		Scanner in=new Scanner(System.in);
		int N=in.nextInt();
		int T=in.nextInt();
		
		int com=1001;
		while(in.hasNext()){
		    int n=in.nextInt();
		    int t=in.nextInt();
		    if(t>T)
		        continue;
		    else
		    {
		       if(n<=com) com=n;
		       
		    }     
		       
		}
	
		if(com==1001) System.out.println("TLE");
		else System.out.println(com);
		
	} main {
		Scanner in=new Scanner(System.in);
		int N=in.nextInt();
		int T=in.nextInt();
		
		int com=1001;
		while(in.hasNext()){
		    int n=in.nextInt();
		    int t=in.nextInt();
		    if(t>T)
		        continue;
		    else
		    {
		       if(n<=com) com=n;
		       
		    }     
		       
		}
	
		if(com==1001) System.out.println("TLE");
		else System.out.println(com);
		
	} 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 com=1001; com 1001 while(in.hasNext()){
		    int n=in.nextInt();
		    int t=in.nextInt();
		    if(t>T)
		        continue;
		    else
		    {
		       if(n<=com) com=n;
		       
		    }     
		       
		} in.hasNext() in.hasNext in {
		    int n=in.nextInt();
		    int t=in.nextInt();
		    if(t>T)
		        continue;
		    else
		    {
		       if(n<=com) com=n;
		       
		    }     
		       
		} int n=in.nextInt(); n in.nextInt() in.nextInt in int t=in.nextInt(); t in.nextInt() in.nextInt in if(t>T)
		        continue;
		    else
		    {
		       if(n<=com) com=n;
		       
		    } t>T t T continue; {
		       if(n<=com) com=n;
		       
		    } if(n<=com) com=n; n<=com n com com=n com n if(com==1001) System.out.println("TLE");
		else System.out.println(com); com==1001 com 1001 System.out.println("TLE") System.out.println System.out System System.out "TLE" System.out.println(com) System.out.println System.out System System.out com String[] args args
import java.util.*;


class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner in=new Scanner(System.in);
		int N=in.nextInt();
		int T=in.nextInt();
		
		int com=1001;
		while(in.hasNext()){
		    int n=in.nextInt();
		    int t=in.nextInt();
		    if(t>T)
		        continue;
		    else
		    {
		       if(n<=com) com=n;
		       
		    }     
		       
		}
	
		if(com==1001) System.out.println("TLE");
		else System.out.println(com);
		
	}
}