import java.util.*;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int t = sc.nextInt();
    int[] c = new int[n];
    int[] data_t = new int[n];
    int x = 0;

    for(int i = 0;i < n;i++) {
      c[i] = sc.nextInt();
      data_t[i] = sc.nextInt();
    }

    int min = 1001;

    for(int i = 0;i < n;i++) {
      if(data_t[i] <= t) {
        min = Math.min(min,c[i]);
        if(min == c[i]) x = c[i];
      }
    }

    if(min == 1001) {
      System.out.println("TLE");
    } else {
      System.out.println(x);
    }

  }

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

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int t = sc.nextInt();
    int[] c = new int[n];
    int[] data_t = new int[n];
    int x = 0;

    for(int i = 0;i < n;i++) {
      c[i] = sc.nextInt();
      data_t[i] = sc.nextInt();
    }

    int min = 1001;

    for(int i = 0;i < n;i++) {
      if(data_t[i] <= t) {
        min = Math.min(min,c[i]);
        if(min == c[i]) x = c[i];
      }
    }

    if(min == 1001) {
      System.out.println("TLE");
    } else {
      System.out.println(x);
    }

  }

} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int t = sc.nextInt();
    int[] c = new int[n];
    int[] data_t = new int[n];
    int x = 0;

    for(int i = 0;i < n;i++) {
      c[i] = sc.nextInt();
      data_t[i] = sc.nextInt();
    }

    int min = 1001;

    for(int i = 0;i < n;i++) {
      if(data_t[i] <= t) {
        min = Math.min(min,c[i]);
        if(min == c[i]) x = c[i];
      }
    }

    if(min == 1001) {
      System.out.println("TLE");
    } else {
      System.out.println(x);
    }

  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int t = sc.nextInt();
    int[] c = new int[n];
    int[] data_t = new int[n];
    int x = 0;

    for(int i = 0;i < n;i++) {
      c[i] = sc.nextInt();
      data_t[i] = sc.nextInt();
    }

    int min = 1001;

    for(int i = 0;i < n;i++) {
      if(data_t[i] <= t) {
        min = Math.min(min,c[i]);
        if(min == c[i]) x = c[i];
      }
    }

    if(min == 1001) {
      System.out.println("TLE");
    } else {
      System.out.println(x);
    }

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

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int t = sc.nextInt();
    int[] c = new int[n];
    int[] data_t = new int[n];
    int x = 0;

    for(int i = 0;i < n;i++) {
      c[i] = sc.nextInt();
      data_t[i] = sc.nextInt();
    }

    int min = 1001;

    for(int i = 0;i < n;i++) {
      if(data_t[i] <= t) {
        min = Math.min(min,c[i]);
        if(min == c[i]) x = c[i];
      }
    }

    if(min == 1001) {
      System.out.println("TLE");
    } else {
      System.out.println(x);
    }

  }

} public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int t = sc.nextInt();
    int[] c = new int[n];
    int[] data_t = new int[n];
    int x = 0;

    for(int i = 0;i < n;i++) {
      c[i] = sc.nextInt();
      data_t[i] = sc.nextInt();
    }

    int min = 1001;

    for(int i = 0;i < n;i++) {
      if(data_t[i] <= t) {
        min = Math.min(min,c[i]);
        if(min == c[i]) x = c[i];
      }
    }

    if(min == 1001) {
      System.out.println("TLE");
    } else {
      System.out.println(x);
    }

  }

} Main
import java.util.*;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int t = sc.nextInt();
    int[] c = new int[n];
    int[] data_t = new int[n];
    int x = 0;

    for(int i = 0;i < n;i++) {
      c[i] = sc.nextInt();
      data_t[i] = sc.nextInt();
    }

    int min = 1001;

    for(int i = 0;i < n;i++) {
      if(data_t[i] <= t) {
        min = Math.min(min,c[i]);
        if(min == c[i]) x = c[i];
      }
    }

    if(min == 1001) {
      System.out.println("TLE");
    } else {
      System.out.println(x);
    }

  }

}