function getLines(input){
	return input.split("\n").map((s)=>s.trim())
}
function parseLine(line){
	return line.split(" ").map((s)=>s.trim());
}
function parseLineToInt(line){
	return line.split(" ").map((s)=>parseInt(s.trim()));
}
// parameter "input" gets all data
function Main(input) {
	// the first line is assigned to input[0], the second line is assigned to input[1] similarly.	
	input = getLines(input).map(parseLineToInt);
	var n = input[0][0];
	var t=input[0][1];
	input.shift()
	input=input.filter((ct)=>ct[1]<=t)

	if(input.length==0){
		console.log('TLE')
	}else{
		input.sort((a,b)=>a[0]-b[0])
		console.log(input[0][0]);
	}
	
}
Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
