import java.util.Scanner;

public class Main{
  static String[] str;
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    String A = sc.next();
    str = A.split("/",0);
    int Toshi = Integer.parseInt(str[0]);
    int Tuki = Integer.parseInt(str[1]);
    int Aate = Integer.parseInt(str[2]);

    if(Toshi>2019){
      System.out.println("TBD");
    }
    else if(Tuki>4){
      System.out.println("TBD");
    }
    else if(Aate>30){
      System.out.println("TBD");
    }
    else{
      System.out.println("Heisei");
    }
  }
} import java.util.Scanner; Scanner java.util public class Main{
  static String[] str;
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    String A = sc.next();
    str = A.split("/",0);
    int Toshi = Integer.parseInt(str[0]);
    int Tuki = Integer.parseInt(str[1]);
    int Aate = Integer.parseInt(str[2]);

    if(Toshi>2019){
      System.out.println("TBD");
    }
    else if(Tuki>4){
      System.out.println("TBD");
    }
    else if(Aate>30){
      System.out.println("TBD");
    }
    else{
      System.out.println("Heisei");
    }
  }
} Main static String[] str; str public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    String A = sc.next();
    str = A.split("/",0);
    int Toshi = Integer.parseInt(str[0]);
    int Tuki = Integer.parseInt(str[1]);
    int Aate = Integer.parseInt(str[2]);

    if(Toshi>2019){
      System.out.println("TBD");
    }
    else if(Tuki>4){
      System.out.println("TBD");
    }
    else if(Aate>30){
      System.out.println("TBD");
    }
    else{
      System.out.println("Heisei");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    String A = sc.next();
    str = A.split("/",0);
    int Toshi = Integer.parseInt(str[0]);
    int Tuki = Integer.parseInt(str[1]);
    int Aate = Integer.parseInt(str[2]);

    if(Toshi>2019){
      System.out.println("TBD");
    }
    else if(Tuki>4){
      System.out.println("TBD");
    }
    else if(Aate>30){
      System.out.println("TBD");
    }
    else{
      System.out.println("Heisei");
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String A = sc.next(); A sc.next() sc.next sc str = A.split("/",0) str A.split("/",0) A.split A "/" 0 int Toshi = Integer.parseInt(str[0]); Toshi Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int Tuki = Integer.parseInt(str[1]); Tuki Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 int Aate = Integer.parseInt(str[2]); Aate Integer.parseInt(str[2]) Integer.parseInt Integer str[2] str 2 if(Toshi>2019){
      System.out.println("TBD");
    }
    else if(Tuki>4){
      System.out.println("TBD");
    }
    else if(Aate>30){
      System.out.println("TBD");
    }
    else{
      System.out.println("Heisei");
    } Toshi>2019 Toshi 2019 {
      System.out.println("TBD");
    } System.out.println("TBD") System.out.println System.out System System.out "TBD" if(Tuki>4){
      System.out.println("TBD");
    }
    else if(Aate>30){
      System.out.println("TBD");
    }
    else{
      System.out.println("Heisei");
    } Tuki>4 Tuki 4 {
      System.out.println("TBD");
    } System.out.println("TBD") System.out.println System.out System System.out "TBD" if(Aate>30){
      System.out.println("TBD");
    }
    else{
      System.out.println("Heisei");
    } Aate>30 Aate 30 {
      System.out.println("TBD");
    } System.out.println("TBD") System.out.println System.out System System.out "TBD" {
      System.out.println("Heisei");
    } System.out.println("Heisei") System.out.println System.out System System.out "Heisei" String args[] args public class Main{
  static String[] str;
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    String A = sc.next();
    str = A.split("/",0);
    int Toshi = Integer.parseInt(str[0]);
    int Tuki = Integer.parseInt(str[1]);
    int Aate = Integer.parseInt(str[2]);

    if(Toshi>2019){
      System.out.println("TBD");
    }
    else if(Tuki>4){
      System.out.println("TBD");
    }
    else if(Aate>30){
      System.out.println("TBD");
    }
    else{
      System.out.println("Heisei");
    }
  }
} public class Main{
  static String[] str;
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    String A = sc.next();
    str = A.split("/",0);
    int Toshi = Integer.parseInt(str[0]);
    int Tuki = Integer.parseInt(str[1]);
    int Aate = Integer.parseInt(str[2]);

    if(Toshi>2019){
      System.out.println("TBD");
    }
    else if(Tuki>4){
      System.out.println("TBD");
    }
    else if(Aate>30){
      System.out.println("TBD");
    }
    else{
      System.out.println("Heisei");
    }
  }
} Main
import java.util.Scanner;

public class Main{
  static String[] str;
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    String A = sc.next();
    str = A.split("/",0);
    int Toshi = Integer.parseInt(str[0]);
    int Tuki = Integer.parseInt(str[1]);
    int Aate = Integer.parseInt(str[2]);

    if(Toshi>2019){
      System.out.println("TBD");
    }
    else if(Tuki>4){
      System.out.println("TBD");
    }
    else if(Aate>30){
      System.out.println("TBD");
    }
    else{
      System.out.println("Heisei");
    }
  }
}
