import static java.lang.Integer.*;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class Main {
	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
		st = new StringTokenizer(br.readLine());
		int N = parseInt(st.nextToken());
		int T = parseInt(st.nextToken());
//		int[] c = new int[N];
//		int[] t = new int[N];

		TreeSet<Integer> set = new TreeSet<Integer>();

		for(int i=0;i<N;i++) {
			st = new StringTokenizer(br.readLine());
			int c = parseInt(st.nextToken());
			int t = parseInt(st.nextToken());
			if(t <= T) {
				set.add(c);
			}
		}

		if(set.isEmpty()) {
			System.out.println("TLE");

		}else {
			System.out.println(set.first());

		}



	}




} import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.Integer.*; import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.StringTokenizer; StringTokenizer java.util import java.util.TreeSet; TreeSet java.util public class Main {
	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
		st = new StringTokenizer(br.readLine());
		int N = parseInt(st.nextToken());
		int T = parseInt(st.nextToken());
//		int[] c = new int[N];
//		int[] t = new int[N];

		TreeSet<Integer> set = new TreeSet<Integer>();

		for(int i=0;i<N;i++) {
			st = new StringTokenizer(br.readLine());
			int c = parseInt(st.nextToken());
			int t = parseInt(st.nextToken());
			if(t <= T) {
				set.add(c);
			}
		}

		if(set.isEmpty()) {
			System.out.println("TLE");

		}else {
			System.out.println(set.first());

		}



	}




} Main public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
		st = new StringTokenizer(br.readLine());
		int N = parseInt(st.nextToken());
		int T = parseInt(st.nextToken());
//		int[] c = new int[N];
//		int[] t = new int[N];

		TreeSet<Integer> set = new TreeSet<Integer>();

		for(int i=0;i<N;i++) {
			st = new StringTokenizer(br.readLine());
			int c = parseInt(st.nextToken());
			int t = parseInt(st.nextToken());
			if(t <= T) {
				set.add(c);
			}
		}

		if(set.isEmpty()) {
			System.out.println("TLE");

		}else {
			System.out.println(set.first());

		}



	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
		st = new StringTokenizer(br.readLine());
		int N = parseInt(st.nextToken());
		int T = parseInt(st.nextToken());
//		int[] c = new int[N];
//		int[] t = new int[N];

		TreeSet<Integer> set = new TreeSet<Integer>();

		for(int i=0;i<N;i++) {
			st = new StringTokenizer(br.readLine());
			int c = parseInt(st.nextToken());
			int t = parseInt(st.nextToken());
			if(t <= T) {
				set.add(c);
			}
		}

		if(set.isEmpty()) {
			System.out.println("TLE");

		}else {
			System.out.println(set.first());

		}



	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st; st st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) int N = parseInt(st.nextToken()); N parseInt(st.nextToken()) parseInt st.nextToken() st.nextToken st int T = parseInt(st.nextToken()); T parseInt(st.nextToken()) parseInt st.nextToken() st.nextToken st TreeSet<Integer> set = new TreeSet<Integer>(); set new TreeSet<Integer>() for(int i=0;i<N;i++) {
			st = new StringTokenizer(br.readLine());
			int c = parseInt(st.nextToken());
			int t = parseInt(st.nextToken());
			if(t <= T) {
				set.add(c);
			}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			st = new StringTokenizer(br.readLine());
			int c = parseInt(st.nextToken());
			int t = parseInt(st.nextToken());
			if(t <= T) {
				set.add(c);
			}
		} {
			st = new StringTokenizer(br.readLine());
			int c = parseInt(st.nextToken());
			int t = parseInt(st.nextToken());
			if(t <= T) {
				set.add(c);
			}
		} st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) int c = parseInt(st.nextToken()); c parseInt(st.nextToken()) parseInt st.nextToken() st.nextToken st int t = parseInt(st.nextToken()); t parseInt(st.nextToken()) parseInt st.nextToken() st.nextToken st if(t <= T) {
				set.add(c);
			} t <= T t T {
				set.add(c);
			} set.add(c) set.add set c if(set.isEmpty()) {
			System.out.println("TLE");

		}else {
			System.out.println(set.first());

		} set.isEmpty() set.isEmpty set {
			System.out.println("TLE");

		} System.out.println("TLE") System.out.println System.out System System.out "TLE" {
			System.out.println(set.first());

		} System.out.println(set.first()) System.out.println System.out System System.out set.first() set.first set String[] args args public class Main {
	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
		st = new StringTokenizer(br.readLine());
		int N = parseInt(st.nextToken());
		int T = parseInt(st.nextToken());
//		int[] c = new int[N];
//		int[] t = new int[N];

		TreeSet<Integer> set = new TreeSet<Integer>();

		for(int i=0;i<N;i++) {
			st = new StringTokenizer(br.readLine());
			int c = parseInt(st.nextToken());
			int t = parseInt(st.nextToken());
			if(t <= T) {
				set.add(c);
			}
		}

		if(set.isEmpty()) {
			System.out.println("TLE");

		}else {
			System.out.println(set.first());

		}



	}




} public class Main {
	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
		st = new StringTokenizer(br.readLine());
		int N = parseInt(st.nextToken());
		int T = parseInt(st.nextToken());
//		int[] c = new int[N];
//		int[] t = new int[N];

		TreeSet<Integer> set = new TreeSet<Integer>();

		for(int i=0;i<N;i++) {
			st = new StringTokenizer(br.readLine());
			int c = parseInt(st.nextToken());
			int t = parseInt(st.nextToken());
			if(t <= T) {
				set.add(c);
			}
		}

		if(set.isEmpty()) {
			System.out.println("TLE");

		}else {
			System.out.println(set.first());

		}



	}




} Main
import static java.lang.Integer.*;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class Main {
	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
		st = new StringTokenizer(br.readLine());
		int N = parseInt(st.nextToken());
		int T = parseInt(st.nextToken());
//		int[] c = new int[N];
//		int[] t = new int[N];

		TreeSet<Integer> set = new TreeSet<Integer>();

		for(int i=0;i<N;i++) {
			st = new StringTokenizer(br.readLine());
			int c = parseInt(st.nextToken());
			int t = parseInt(st.nextToken());
			if(t <= T) {
				set.add(c);
			}
		}

		if(set.isEmpty()) {
			System.out.println("TLE");

		}else {
			System.out.println(set.first());

		}



	}




}