import java.util.*;
class Main
{
    public static void main (String[] args)
    {
        String ans = judge()? "TBD" : "Heisei";
        System.out.println(ans);
    }
    static boolean judge(){
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        String y= "", m = "", d = "";
        for(int i = 0; i < 2; i++){
            m += s.charAt(i + 5);
            d += s.charAt(i + 8);
        }
        int month = Integer.parseInt(m), date = Integer.parseInt(d);
        if(month < 4) return false;
        if(month == 4 && date <= 30) return false;
        return true;
    }
} import java.util.*; util.* java class Main
{
    public static void main (String[] args)
    {
        String ans = judge()? "TBD" : "Heisei";
        System.out.println(ans);
    }
    static boolean judge(){
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        String y= "", m = "", d = "";
        for(int i = 0; i < 2; i++){
            m += s.charAt(i + 5);
            d += s.charAt(i + 8);
        }
        int month = Integer.parseInt(m), date = Integer.parseInt(d);
        if(month < 4) return false;
        if(month == 4 && date <= 30) return false;
        return true;
    }
} Main public static void main (String[] args)
    {
        String ans = judge()? "TBD" : "Heisei";
        System.out.println(ans);
    } main {
        String ans = judge()? "TBD" : "Heisei";
        System.out.println(ans);
    } String ans = judge()? "TBD" : "Heisei"; ans judge()? "TBD" : "Heisei" judge() judge "TBD" "Heisei" System.out.println(ans) System.out.println System.out System System.out ans String[] args args static boolean judge(){
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        String y= "", m = "", d = "";
        for(int i = 0; i < 2; i++){
            m += s.charAt(i + 5);
            d += s.charAt(i + 8);
        }
        int month = Integer.parseInt(m), date = Integer.parseInt(d);
        if(month < 4) return false;
        if(month == 4 && date <= 30) return false;
        return true;
    } judge {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        String y= "", m = "", d = "";
        for(int i = 0; i < 2; i++){
            m += s.charAt(i + 5);
            d += s.charAt(i + 8);
        }
        int month = Integer.parseInt(m), date = Integer.parseInt(d);
        if(month < 4) return false;
        if(month == 4 && date <= 30) return false;
        return true;
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String y= "" y "" m = "" m "" d = ""; d "" for(int i = 0; i < 2; i++){
            m += s.charAt(i + 5);
            d += s.charAt(i + 8);
        } int i = 0; int i = 0; i 0 i < 2 i 2 i++ i++ i {
            m += s.charAt(i + 5);
            d += s.charAt(i + 8);
        } {
            m += s.charAt(i + 5);
            d += s.charAt(i + 8);
        } m += s.charAt(i + 5) m s.charAt(i + 5) s.charAt s i + 5 i 5 d += s.charAt(i + 8) d s.charAt(i + 8) s.charAt s i + 8 i 8 int month = Integer.parseInt(m) month Integer.parseInt(m) Integer.parseInt Integer m date = Integer.parseInt(d); date Integer.parseInt(d) Integer.parseInt Integer d if(month < 4) return false; month < 4 month 4 return false; false if(month == 4 && date <= 30) return false; month == 4 && date <= 30 month == 4 month 4 date <= 30 date 30 return false; false return true; true
import java.util.*;
class Main
{
    public static void main (String[] args)
    {
        String ans = judge()? "TBD" : "Heisei";
        System.out.println(ans);
    }
    static boolean judge(){
        Scanner sc = new Scanner(System.in);

        String s = sc.next();
        String y= "", m = "", d = "";
        for(int i = 0; i < 2; i++){
            m += s.charAt(i + 5);
            d += s.charAt(i + 8);
        }
        int month = Integer.parseInt(m), date = Integer.parseInt(d);
        if(month < 4) return false;
        if(month == 4 && date <= 30) return false;
        return true;
    }
}