import java.util.Scanner;
class Main
{
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
        String s=sc.next();
        String year0=s.substring(0,4);
        int year1=Integer.parseInt(year0);
        String day0=s.substring(8);
        int day1=Integer.parseInt(day0);

        if(year1<=2019){
            if(s.charAt(5)=='0'&&s.charAt(6)<='4'){
                if(day1<=30){
                    System.out.println("Heisei");
                }
                else{
                    System.out.println("TBD");
                }
            }
            else{
                System.out.println("TBD");
            }
        }
        else{
            System.out.println("TBD");
        }
        sc.close();
    }
} import java.util.Scanner; Scanner java.util class Main
{
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
        String s=sc.next();
        String year0=s.substring(0,4);
        int year1=Integer.parseInt(year0);
        String day0=s.substring(8);
        int day1=Integer.parseInt(day0);

        if(year1<=2019){
            if(s.charAt(5)=='0'&&s.charAt(6)<='4'){
                if(day1<=30){
                    System.out.println("Heisei");
                }
                else{
                    System.out.println("TBD");
                }
            }
            else{
                System.out.println("TBD");
            }
        }
        else{
            System.out.println("TBD");
        }
        sc.close();
    }
} Main public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
        String s=sc.next();
        String year0=s.substring(0,4);
        int year1=Integer.parseInt(year0);
        String day0=s.substring(8);
        int day1=Integer.parseInt(day0);

        if(year1<=2019){
            if(s.charAt(5)=='0'&&s.charAt(6)<='4'){
                if(day1<=30){
                    System.out.println("Heisei");
                }
                else{
                    System.out.println("TBD");
                }
            }
            else{
                System.out.println("TBD");
            }
        }
        else{
            System.out.println("TBD");
        }
        sc.close();
    } main {
		Scanner sc=new Scanner(System.in);
        String s=sc.next();
        String year0=s.substring(0,4);
        int year1=Integer.parseInt(year0);
        String day0=s.substring(8);
        int day1=Integer.parseInt(day0);

        if(year1<=2019){
            if(s.charAt(5)=='0'&&s.charAt(6)<='4'){
                if(day1<=30){
                    System.out.println("Heisei");
                }
                else{
                    System.out.println("TBD");
                }
            }
            else{
                System.out.println("TBD");
            }
        }
        else{
            System.out.println("TBD");
        }
        sc.close();
    } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String s=sc.next(); s sc.next() sc.next sc String year0=s.substring(0,4); year0 s.substring(0,4) s.substring s 0 4 int year1=Integer.parseInt(year0); year1 Integer.parseInt(year0) Integer.parseInt Integer year0 String day0=s.substring(8); day0 s.substring(8) s.substring s 8 int day1=Integer.parseInt(day0); day1 Integer.parseInt(day0) Integer.parseInt Integer day0 if(year1<=2019){
            if(s.charAt(5)=='0'&&s.charAt(6)<='4'){
                if(day1<=30){
                    System.out.println("Heisei");
                }
                else{
                    System.out.println("TBD");
                }
            }
            else{
                System.out.println("TBD");
            }
        }
        else{
            System.out.println("TBD");
        } year1<=2019 year1 2019 {
            if(s.charAt(5)=='0'&&s.charAt(6)<='4'){
                if(day1<=30){
                    System.out.println("Heisei");
                }
                else{
                    System.out.println("TBD");
                }
            }
            else{
                System.out.println("TBD");
            }
        } if(s.charAt(5)=='0'&&s.charAt(6)<='4'){
                if(day1<=30){
                    System.out.println("Heisei");
                }
                else{
                    System.out.println("TBD");
                }
            }
            else{
                System.out.println("TBD");
            } s.charAt(5)=='0'&&s.charAt(6)<='4' s.charAt(5)=='0' s.charAt(5) s.charAt s 5 '0' s.charAt(6)<='4' s.charAt(6) s.charAt s 6 '4' {
                if(day1<=30){
                    System.out.println("Heisei");
                }
                else{
                    System.out.println("TBD");
                }
            } if(day1<=30){
                    System.out.println("Heisei");
                }
                else{
                    System.out.println("TBD");
                } day1<=30 day1 30 {
                    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" {
                System.out.println("TBD");
            } System.out.println("TBD") System.out.println System.out System System.out "TBD" {
            System.out.println("TBD");
        } System.out.println("TBD") System.out.println System.out System System.out "TBD" sc.close() sc.close sc String args[] args
import java.util.Scanner;
class Main
{
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
        String s=sc.next();
        String year0=s.substring(0,4);
        int year1=Integer.parseInt(year0);
        String day0=s.substring(8);
        int day1=Integer.parseInt(day0);

        if(year1<=2019){
            if(s.charAt(5)=='0'&&s.charAt(6)<='4'){
                if(day1<=30){
                    System.out.println("Heisei");
                }
                else{
                    System.out.println("TBD");
                }
            }
            else{
                System.out.println("TBD");
            }
        }
        else{
            System.out.println("TBD");
        }
        sc.close();
    }
}