import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   String S = sc.next();
   String Ss = S.substring(0,4)+S.substring(5,7)+S.substring(8,10);
   int day = Integer.parseInt(Ss);
   if(day<=20190430) 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 Ss = S.substring(0,4)+S.substring(5,7)+S.substring(8,10);
   int day = Integer.parseInt(Ss);
   if(day<=20190430) 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 Ss = S.substring(0,4)+S.substring(5,7)+S.substring(8,10);
   int day = Integer.parseInt(Ss);
   if(day<=20190430) System.out.println("Heisei");
   else System.out.println("TBD");
 } main {
   Scanner sc = new Scanner(System.in);
   String S = sc.next();
   String Ss = S.substring(0,4)+S.substring(5,7)+S.substring(8,10);
   int day = Integer.parseInt(Ss);
   if(day<=20190430) 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 Ss = S.substring(0,4)+S.substring(5,7)+S.substring(8,10); Ss S.substring(0,4)+S.substring(5,7)+S.substring(8,10) S.substring(0,4)+S.substring(5,7)+S.substring(8,10) S.substring(0,4) S.substring S 0 4 S.substring(5,7) S.substring S 5 7 S.substring(8,10) S.substring S 8 10 int day = Integer.parseInt(Ss); day Integer.parseInt(Ss) Integer.parseInt Integer Ss if(day<=20190430) System.out.println("Heisei");
   else System.out.println("TBD"); day<=20190430 day 20190430 System.out.println("Heisei") System.out.println System.out System System.out "Heisei" 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 Ss = S.substring(0,4)+S.substring(5,7)+S.substring(8,10);
   int day = Integer.parseInt(Ss);
   if(day<=20190430) 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 Ss = S.substring(0,4)+S.substring(5,7)+S.substring(8,10);
   int day = Integer.parseInt(Ss);
   if(day<=20190430) 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 Ss = S.substring(0,4)+S.substring(5,7)+S.substring(8,10);
   int day = Integer.parseInt(Ss);
   if(day<=20190430) System.out.println("Heisei");
   else System.out.println("TBD");
 }
}