#include<cstdio>
int n,m,c,t,ans=1001;
int main(){
	scanf("%d%d",&n,&m);
	for(int i=1;i<=n;i++){
		scanf("%d%d",&c,&t);
		if(t<=m)
			if(c<ans)
				ans=c;
	}
	if(ans==1001)
		printf("TLE\n");
	else
		printf("%d\n",ans);
}