import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] a = sc.nextLine().split(" ");
		// num of way
		int N = Integer.parseInt(a[0]);
		// limit
		int T = Integer.parseInt(a[1]);

		Map<Integer, Integer> map = new HashMap<>();
		//ways
		for (int i = 0; i < N; i++) {
			String[] tmp = sc.nextLine().split(" ");
			map.put(Integer.parseInt(tmp[0]), Integer.parseInt(tmp[1]));
		}

		ArrayList<Integer> b = new ArrayList<Integer>();
		for (Entry<Integer, Integer> entry : map.entrySet()) {
			if (entry.getValue() <= T) {
				b.add(entry.getKey());
			}
		}
		Collections.sort(b);

		if (b.isEmpty()) {
			System.out.println("TLE");
		} else {
			System.out.println(b.get(0));
		}

		sc.close();
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Map.Entry; Entry java.util.Map import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] a = sc.nextLine().split(" ");
		// num of way
		int N = Integer.parseInt(a[0]);
		// limit
		int T = Integer.parseInt(a[1]);

		Map<Integer, Integer> map = new HashMap<>();
		//ways
		for (int i = 0; i < N; i++) {
			String[] tmp = sc.nextLine().split(" ");
			map.put(Integer.parseInt(tmp[0]), Integer.parseInt(tmp[1]));
		}

		ArrayList<Integer> b = new ArrayList<Integer>();
		for (Entry<Integer, Integer> entry : map.entrySet()) {
			if (entry.getValue() <= T) {
				b.add(entry.getKey());
			}
		}
		Collections.sort(b);

		if (b.isEmpty()) {
			System.out.println("TLE");
		} else {
			System.out.println(b.get(0));
		}

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] a = sc.nextLine().split(" ");
		// num of way
		int N = Integer.parseInt(a[0]);
		// limit
		int T = Integer.parseInt(a[1]);

		Map<Integer, Integer> map = new HashMap<>();
		//ways
		for (int i = 0; i < N; i++) {
			String[] tmp = sc.nextLine().split(" ");
			map.put(Integer.parseInt(tmp[0]), Integer.parseInt(tmp[1]));
		}

		ArrayList<Integer> b = new ArrayList<Integer>();
		for (Entry<Integer, Integer> entry : map.entrySet()) {
			if (entry.getValue() <= T) {
				b.add(entry.getKey());
			}
		}
		Collections.sort(b);

		if (b.isEmpty()) {
			System.out.println("TLE");
		} else {
			System.out.println(b.get(0));
		}

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		String[] a = sc.nextLine().split(" ");
		// num of way
		int N = Integer.parseInt(a[0]);
		// limit
		int T = Integer.parseInt(a[1]);

		Map<Integer, Integer> map = new HashMap<>();
		//ways
		for (int i = 0; i < N; i++) {
			String[] tmp = sc.nextLine().split(" ");
			map.put(Integer.parseInt(tmp[0]), Integer.parseInt(tmp[1]));
		}

		ArrayList<Integer> b = new ArrayList<Integer>();
		for (Entry<Integer, Integer> entry : map.entrySet()) {
			if (entry.getValue() <= T) {
				b.add(entry.getKey());
			}
		}
		Collections.sort(b);

		if (b.isEmpty()) {
			System.out.println("TLE");
		} else {
			System.out.println(b.get(0));
		}

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] a = sc.nextLine().split(" "); a sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int N = Integer.parseInt(a[0]); N Integer.parseInt(a[0]) Integer.parseInt Integer a[0] a 0 int T = Integer.parseInt(a[1]); T Integer.parseInt(a[1]) Integer.parseInt Integer a[1] a 1 Map<Integer, Integer> map = new HashMap<>(); map new HashMap<>() for (int i = 0; i < N; i++) {
			String[] tmp = sc.nextLine().split(" ");
			map.put(Integer.parseInt(tmp[0]), Integer.parseInt(tmp[1]));
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			String[] tmp = sc.nextLine().split(" ");
			map.put(Integer.parseInt(tmp[0]), Integer.parseInt(tmp[1]));
		} {
			String[] tmp = sc.nextLine().split(" ");
			map.put(Integer.parseInt(tmp[0]), Integer.parseInt(tmp[1]));
		} String[] tmp = sc.nextLine().split(" "); tmp sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " map.put(Integer.parseInt(tmp[0]), Integer.parseInt(tmp[1])) map.put map Integer.parseInt(tmp[0]) Integer.parseInt Integer tmp[0] tmp 0 Integer.parseInt(tmp[1]) Integer.parseInt Integer tmp[1] tmp 1 ArrayList<Integer> b = new ArrayList<Integer>(); b new ArrayList<Integer>() for (Entry<Integer, Integer> entry : map.entrySet()) {
			if (entry.getValue() <= T) {
				b.add(entry.getKey());
			}
		} Entry<Integer, Integer> entry map.entrySet() map.entrySet map {
			if (entry.getValue() <= T) {
				b.add(entry.getKey());
			}
		} {
			if (entry.getValue() <= T) {
				b.add(entry.getKey());
			}
		} if (entry.getValue() <= T) {
				b.add(entry.getKey());
			} entry.getValue() <= T entry.getValue() entry.getValue entry T {
				b.add(entry.getKey());
			} b.add(entry.getKey()) b.add b entry.getKey() entry.getKey entry Collections.sort(b) Collections.sort Collections b if (b.isEmpty()) {
			System.out.println("TLE");
		} else {
			System.out.println(b.get(0));
		} b.isEmpty() b.isEmpty b {
			System.out.println("TLE");
		} System.out.println("TLE") System.out.println System.out System System.out "TLE" {
			System.out.println(b.get(0));
		} System.out.println(b.get(0)) System.out.println System.out System System.out b.get(0) b.get b 0 sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] a = sc.nextLine().split(" ");
		// num of way
		int N = Integer.parseInt(a[0]);
		// limit
		int T = Integer.parseInt(a[1]);

		Map<Integer, Integer> map = new HashMap<>();
		//ways
		for (int i = 0; i < N; i++) {
			String[] tmp = sc.nextLine().split(" ");
			map.put(Integer.parseInt(tmp[0]), Integer.parseInt(tmp[1]));
		}

		ArrayList<Integer> b = new ArrayList<Integer>();
		for (Entry<Integer, Integer> entry : map.entrySet()) {
			if (entry.getValue() <= T) {
				b.add(entry.getKey());
			}
		}
		Collections.sort(b);

		if (b.isEmpty()) {
			System.out.println("TLE");
		} else {
			System.out.println(b.get(0));
		}

		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] a = sc.nextLine().split(" ");
		// num of way
		int N = Integer.parseInt(a[0]);
		// limit
		int T = Integer.parseInt(a[1]);

		Map<Integer, Integer> map = new HashMap<>();
		//ways
		for (int i = 0; i < N; i++) {
			String[] tmp = sc.nextLine().split(" ");
			map.put(Integer.parseInt(tmp[0]), Integer.parseInt(tmp[1]));
		}

		ArrayList<Integer> b = new ArrayList<Integer>();
		for (Entry<Integer, Integer> entry : map.entrySet()) {
			if (entry.getValue() <= T) {
				b.add(entry.getKey());
			}
		}
		Collections.sort(b);

		if (b.isEmpty()) {
			System.out.println("TLE");
		} else {
			System.out.println(b.get(0));
		}

		sc.close();
	}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String[] a = sc.nextLine().split(" ");
		// num of way
		int N = Integer.parseInt(a[0]);
		// limit
		int T = Integer.parseInt(a[1]);

		Map<Integer, Integer> map = new HashMap<>();
		//ways
		for (int i = 0; i < N; i++) {
			String[] tmp = sc.nextLine().split(" ");
			map.put(Integer.parseInt(tmp[0]), Integer.parseInt(tmp[1]));
		}

		ArrayList<Integer> b = new ArrayList<Integer>();
		for (Entry<Integer, Integer> entry : map.entrySet()) {
			if (entry.getValue() <= T) {
				b.add(entry.getKey());
			}
		}
		Collections.sort(b);

		if (b.isEmpty()) {
			System.out.println("TLE");
		} else {
			System.out.println(b.get(0));
		}

		sc.close();
	}
}