import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    
    String yyyy = s.substring(0,4);
    String mm = s.substring(5,7);
    String dd = s.substring(8,10);
    
    String yyyymmdd = yyyy + mm + dd;
    int ans = Integer.parseInt(yyyymmdd);
    System.out.println(ans<=20190430?"Heisei":"TBD");
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    
    String yyyy = s.substring(0,4);
    String mm = s.substring(5,7);
    String dd = s.substring(8,10);
    
    String yyyymmdd = yyyy + mm + dd;
    int ans = Integer.parseInt(yyyymmdd);
    System.out.println(ans<=20190430?"Heisei":"TBD");
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    
    String yyyy = s.substring(0,4);
    String mm = s.substring(5,7);
    String dd = s.substring(8,10);
    
    String yyyymmdd = yyyy + mm + dd;
    int ans = Integer.parseInt(yyyymmdd);
    System.out.println(ans<=20190430?"Heisei":"TBD");
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    
    String yyyy = s.substring(0,4);
    String mm = s.substring(5,7);
    String dd = s.substring(8,10);
    
    String yyyymmdd = yyyy + mm + dd;
    int ans = Integer.parseInt(yyyymmdd);
    System.out.println(ans<=20190430?"Heisei":"TBD");
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String s = in.readLine(); s in.readLine() in.readLine in String yyyy = s.substring(0,4); yyyy s.substring(0,4) s.substring s 0 4 String mm = s.substring(5,7); mm s.substring(5,7) s.substring s 5 7 String dd = s.substring(8,10); dd s.substring(8,10) s.substring s 8 10 String yyyymmdd = yyyy + mm + dd; yyyymmdd yyyy + mm + dd yyyy + mm + dd yyyy mm dd int ans = Integer.parseInt(yyyymmdd); ans Integer.parseInt(yyyymmdd) Integer.parseInt Integer yyyymmdd System.out.println(ans<=20190430?"Heisei":"TBD") System.out.println System.out System System.out ans<=20190430?"Heisei":"TBD" ans<=20190430 ans 20190430 "Heisei" "TBD" String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    
    String yyyy = s.substring(0,4);
    String mm = s.substring(5,7);
    String dd = s.substring(8,10);
    
    String yyyymmdd = yyyy + mm + dd;
    int ans = Integer.parseInt(yyyymmdd);
    System.out.println(ans<=20190430?"Heisei":"TBD");
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    
    String yyyy = s.substring(0,4);
    String mm = s.substring(5,7);
    String dd = s.substring(8,10);
    
    String yyyymmdd = yyyy + mm + dd;
    int ans = Integer.parseInt(yyyymmdd);
    System.out.println(ans<=20190430?"Heisei":"TBD");
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    
    String yyyy = s.substring(0,4);
    String mm = s.substring(5,7);
    String dd = s.substring(8,10);
    
    String yyyymmdd = yyyy + mm + dd;
    int ans = Integer.parseInt(yyyymmdd);
    System.out.println(ans<=20190430?"Heisei":"TBD");
  }
}