#include<iostream>
using namespace std;

int main(){
    int n,T;cin>>n>>T;
    int ans=1001;
    int c,t;
    for(int i=0;i<=n;i++){
        cin>>c>>t;
        if(t<=T) ans=min(ans,c);
    }

    if(ans!=1001) cout<<ans<<endl;
    else cout<<"TLE"<<endl;
}