

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n, t, min = 100000, c, l;

		n = sc.nextInt();
		t = sc.nextInt();

		for (int i = 0; i < n; ++i) {
			c = sc.nextInt();
			l = sc.nextInt();
			if (l <= t) {
				min = Math.min(min, c);
			}
		}

		if (min > 1000) {
			System.out.println("TLE");
		} else {
			System.out.println(min);
		}
		sc.close();
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n, t, min = 100000, c, l;

		n = sc.nextInt();
		t = sc.nextInt();

		for (int i = 0; i < n; ++i) {
			c = sc.nextInt();
			l = sc.nextInt();
			if (l <= t) {
				min = Math.min(min, c);
			}
		}

		if (min > 1000) {
			System.out.println("TLE");
		} else {
			System.out.println(min);
		}
		sc.close();
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n, t, min = 100000, c, l;

		n = sc.nextInt();
		t = sc.nextInt();

		for (int i = 0; i < n; ++i) {
			c = sc.nextInt();
			l = sc.nextInt();
			if (l <= t) {
				min = Math.min(min, c);
			}
		}

		if (min > 1000) {
			System.out.println("TLE");
		} else {
			System.out.println(min);
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		int n, t, min = 100000, c, l;

		n = sc.nextInt();
		t = sc.nextInt();

		for (int i = 0; i < n; ++i) {
			c = sc.nextInt();
			l = sc.nextInt();
			if (l <= t) {
				min = Math.min(min, c);
			}
		}

		if (min > 1000) {
			System.out.println("TLE");
		} else {
			System.out.println(min);
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n n t t min = 100000 min 100000 c c l; l n = sc.nextInt() n sc.nextInt() sc.nextInt sc t = sc.nextInt() t sc.nextInt() sc.nextInt sc for (int i = 0; i < n; ++i) {
			c = sc.nextInt();
			l = sc.nextInt();
			if (l <= t) {
				min = Math.min(min, c);
			}
		} int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
			c = sc.nextInt();
			l = sc.nextInt();
			if (l <= t) {
				min = Math.min(min, c);
			}
		} {
			c = sc.nextInt();
			l = sc.nextInt();
			if (l <= t) {
				min = Math.min(min, c);
			}
		} c = sc.nextInt() c sc.nextInt() sc.nextInt sc l = sc.nextInt() l sc.nextInt() sc.nextInt sc if (l <= t) {
				min = Math.min(min, c);
			} l <= t l t {
				min = Math.min(min, c);
			} min = Math.min(min, c) min Math.min(min, c) Math.min Math min c if (min > 1000) {
			System.out.println("TLE");
		} else {
			System.out.println(min);
		} min > 1000 min 1000 {
			System.out.println("TLE");
		} System.out.println("TLE") System.out.println System.out System System.out "TLE" {
			System.out.println(min);
		} System.out.println(min) System.out.println System.out System System.out min sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n, t, min = 100000, c, l;

		n = sc.nextInt();
		t = sc.nextInt();

		for (int i = 0; i < n; ++i) {
			c = sc.nextInt();
			l = sc.nextInt();
			if (l <= t) {
				min = Math.min(min, c);
			}
		}

		if (min > 1000) {
			System.out.println("TLE");
		} else {
			System.out.println(min);
		}
		sc.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n, t, min = 100000, c, l;

		n = sc.nextInt();
		t = sc.nextInt();

		for (int i = 0; i < n; ++i) {
			c = sc.nextInt();
			l = sc.nextInt();
			if (l <= t) {
				min = Math.min(min, c);
			}
		}

		if (min > 1000) {
			System.out.println("TLE");
		} else {
			System.out.println(min);
		}
		sc.close();
	}

} Main


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n, t, min = 100000, c, l;

		n = sc.nextInt();
		t = sc.nextInt();

		for (int i = 0; i < n; ++i) {
			c = sc.nextInt();
			l = sc.nextInt();
			if (l <= t) {
				min = Math.min(min, c);
			}
		}

		if (min > 1000) {
			System.out.println("TLE");
		} else {
			System.out.println(min);
		}
		sc.close();
	}

}
