#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,t,m=100000,c,y;
  cin>>n>>t;
  for(int i=0;i<n;i++){
    cin>>c>>y;
    if(y<=t)
      m=min(m,c);
  }
  if(m==100000){
    cout<<"TLE";
    return 0;
  }
  cout<<m;
}