import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    int t = s.nextInt();
    int c = 10000;
    for(int i = 0; i < n; i++){
      int ci = s.nextInt();
      if(s.nextInt() <= t)
        c = c > ci ? ci : c;
    }
    if(c <= 1000)
      System.out.println(c);
    else
      System.out.println("TLE");
  }
} import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    int t = s.nextInt();
    int c = 10000;
    for(int i = 0; i < n; i++){
      int ci = s.nextInt();
      if(s.nextInt() <= t)
        c = c > ci ? ci : c;
    }
    if(c <= 1000)
      System.out.println(c);
    else
      System.out.println("TLE");
  }
} Main public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    int t = s.nextInt();
    int c = 10000;
    for(int i = 0; i < n; i++){
      int ci = s.nextInt();
      if(s.nextInt() <= t)
        c = c > ci ? ci : c;
    }
    if(c <= 1000)
      System.out.println(c);
    else
      System.out.println("TLE");
  } main {
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    int t = s.nextInt();
    int c = 10000;
    for(int i = 0; i < n; i++){
      int ci = s.nextInt();
      if(s.nextInt() <= t)
        c = c > ci ? ci : c;
    }
    if(c <= 1000)
      System.out.println(c);
    else
      System.out.println("TLE");
  } Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt(); n s.nextInt() s.nextInt s int t = s.nextInt(); t s.nextInt() s.nextInt s int c = 10000; c 10000 for(int i = 0; i < n; i++){
      int ci = s.nextInt();
      if(s.nextInt() <= t)
        c = c > ci ? ci : c;
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      int ci = s.nextInt();
      if(s.nextInt() <= t)
        c = c > ci ? ci : c;
    } {
      int ci = s.nextInt();
      if(s.nextInt() <= t)
        c = c > ci ? ci : c;
    } int ci = s.nextInt(); ci s.nextInt() s.nextInt s if(s.nextInt() <= t)
        c = c > ci ? ci : c; s.nextInt() <= t s.nextInt() s.nextInt s t c = c > ci ? ci : c c c > ci ? ci : c c > ci c ci ci c if(c <= 1000)
      System.out.println(c);
    else
      System.out.println("TLE"); c <= 1000 c 1000 System.out.println(c) System.out.println System.out System System.out c System.out.println("TLE") System.out.println System.out System System.out "TLE" String[] args args public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    int t = s.nextInt();
    int c = 10000;
    for(int i = 0; i < n; i++){
      int ci = s.nextInt();
      if(s.nextInt() <= t)
        c = c > ci ? ci : c;
    }
    if(c <= 1000)
      System.out.println(c);
    else
      System.out.println("TLE");
  }
} public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    int t = s.nextInt();
    int c = 10000;
    for(int i = 0; i < n; i++){
      int ci = s.nextInt();
      if(s.nextInt() <= t)
        c = c > ci ? ci : c;
    }
    if(c <= 1000)
      System.out.println(c);
    else
      System.out.println("TLE");
  }
} Main
import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    int n = s.nextInt();
    int t = s.nextInt();
    int c = 10000;
    for(int i = 0; i < n; i++){
      int ci = s.nextInt();
      if(s.nextInt() <= t)
        c = c > ci ? ci : c;
    }
    if(c <= 1000)
      System.out.println(c);
    else
      System.out.println("TLE");
  }
}