#include<bits/stdc++.h>
using namespace std;
int n,T,a,b,Min=100000;

int main()
{
	cin>>n>>T;
	for(int i=1; i<=n; i++)
	{
		cin>>a>>b;
		if(b<=T) Min=min(Min, a);
	}
	if(Min == 100000)
		cout<<"TLE"<<endl;
	else
		cout<<Min<<endl;
	return 0;
}