import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    String year = S.substring(0, 4);
    String month = S.substring(5, 7);
    String day = S.substring(8);
    
    int yearInt = Integer.parseInt(year);
    int monthInt = Integer.parseInt(month);
    int dayInt = Integer.parseInt(day);
    
    if (yearInt <= 2018) {
      System.out.println("Heisei");
    } else if (yearInt == 2019 && monthInt <= 4) {
      System.out.println("Heisei");
    } else {
      System.out.println("TBD");
    }
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    String year = S.substring(0, 4);
    String month = S.substring(5, 7);
    String day = S.substring(8);
    
    int yearInt = Integer.parseInt(year);
    int monthInt = Integer.parseInt(month);
    int dayInt = Integer.parseInt(day);
    
    if (yearInt <= 2018) {
      System.out.println("Heisei");
    } else if (yearInt == 2019 && monthInt <= 4) {
      System.out.println("Heisei");
    } else {
      System.out.println("TBD");
    }
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    String year = S.substring(0, 4);
    String month = S.substring(5, 7);
    String day = S.substring(8);
    
    int yearInt = Integer.parseInt(year);
    int monthInt = Integer.parseInt(month);
    int dayInt = Integer.parseInt(day);
    
    if (yearInt <= 2018) {
      System.out.println("Heisei");
    } else if (yearInt == 2019 && monthInt <= 4) {
      System.out.println("Heisei");
    } else {
      System.out.println("TBD");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    String year = S.substring(0, 4);
    String month = S.substring(5, 7);
    String day = S.substring(8);
    
    int yearInt = Integer.parseInt(year);
    int monthInt = Integer.parseInt(month);
    int dayInt = Integer.parseInt(day);
    
    if (yearInt <= 2018) {
      System.out.println("Heisei");
    } else if (yearInt == 2019 && monthInt <= 4) {
      System.out.println("Heisei");
    } else {
      System.out.println("TBD");
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc String year = S.substring(0, 4); year S.substring(0, 4) S.substring S 0 4 String month = S.substring(5, 7); month S.substring(5, 7) S.substring S 5 7 String day = S.substring(8); day S.substring(8) S.substring S 8 int yearInt = Integer.parseInt(year); yearInt Integer.parseInt(year) Integer.parseInt Integer year int monthInt = Integer.parseInt(month); monthInt Integer.parseInt(month) Integer.parseInt Integer month int dayInt = Integer.parseInt(day); dayInt Integer.parseInt(day) Integer.parseInt Integer day if (yearInt <= 2018) {
      System.out.println("Heisei");
    } else if (yearInt == 2019 && monthInt <= 4) {
      System.out.println("Heisei");
    } else {
      System.out.println("TBD");
    } yearInt <= 2018 yearInt 2018 {
      System.out.println("Heisei");
    } System.out.println("Heisei") System.out.println System.out System System.out "Heisei" if (yearInt == 2019 && monthInt <= 4) {
      System.out.println("Heisei");
    } else {
      System.out.println("TBD");
    } yearInt == 2019 && monthInt <= 4 yearInt == 2019 yearInt 2019 monthInt <= 4 monthInt 4 {
      System.out.println("Heisei");
    } System.out.println("Heisei") System.out.println System.out System System.out "Heisei" {
      System.out.println("TBD");
    } System.out.println("TBD") System.out.println System.out System System.out "TBD" String[] args args public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    String year = S.substring(0, 4);
    String month = S.substring(5, 7);
    String day = S.substring(8);
    
    int yearInt = Integer.parseInt(year);
    int monthInt = Integer.parseInt(month);
    int dayInt = Integer.parseInt(day);
    
    if (yearInt <= 2018) {
      System.out.println("Heisei");
    } else if (yearInt == 2019 && monthInt <= 4) {
      System.out.println("Heisei");
    } else {
      System.out.println("TBD");
    }
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    String year = S.substring(0, 4);
    String month = S.substring(5, 7);
    String day = S.substring(8);
    
    int yearInt = Integer.parseInt(year);
    int monthInt = Integer.parseInt(month);
    int dayInt = Integer.parseInt(day);
    
    if (yearInt <= 2018) {
      System.out.println("Heisei");
    } else if (yearInt == 2019 && monthInt <= 4) {
      System.out.println("Heisei");
    } else {
      System.out.println("TBD");
    }
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    
    String year = S.substring(0, 4);
    String month = S.substring(5, 7);
    String day = S.substring(8);
    
    int yearInt = Integer.parseInt(year);
    int monthInt = Integer.parseInt(month);
    int dayInt = Integer.parseInt(day);
    
    if (yearInt <= 2018) {
      System.out.println("Heisei");
    } else if (yearInt == 2019 && monthInt <= 4) {
      System.out.println("Heisei");
    } else {
      System.out.println("TBD");
    }
  }
}