#include<iostream>
using namespace std;

int main(){
  int n,t,a=100000,b,c;
  cin>>n>>t;
  for(int i=0;i<n;i++){
    cin>>c>>b;
    if(b<=t && c<=a) a=c;
  }
  
  if(a==100000) cout<<"TLE"<<endl;
  else cout<<a<<endl;
  return 0;
}
  