#include<iostream>
using namespace std;

int main(){
  int n,t,i,c,tt,ans=1001;
  cin >> n >> t;
  for (i=0;i<=n;i++){
    cin >> c >> tt;
    if (tt<=t && ans>c) ans=c;
  }
  if (ans==1001) cout << "TLE" << endl;
  else cout << ans << endl;
}
