#include <bits/stdc++.h>
using namespace std;
 
int main(){
  
  int N,T,c,t,mt=1000,root=0;
  cin>>N>>T;
  
  for(int k=0;k<N;k++){
    	cin>>c>>t;
	if(t>T){continue;}
    if(c<=mt)mt=c;root=k+1;
  	}
  
  	if(root==0)cout<<"TLE"<<endl;
	else cout<<mt<<endl;
}