#include <bits/stdc++.h>
using namespace std;

int main() {
  int N,T;cin>>N>>T;
  int m=99999;
  for(int i=0; i<N; i++){
    int c,t;cin>>c>>t;
    if(T>=t)m=min(c,m);
  }
  if(m==99999)cout<<"TLE"<<endl;
  else cout<<m<<endl;
}