import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
public class Main {
	public static void main(String[] args) throws ParseException {
	Scanner sc=new Scanner(System.in);

	String S=sc.next();
	SimpleDateFormat s=new SimpleDateFormat("yyyy/MM/dd");
	Date date1=s.parse(S);
	Date date=s.parse("2019/4/30");
	
	if((date1.compareTo(date)== -1)||(date1.compareTo(date)==0)) {
	System.out.print("Heisei");
	}
	
	else if(date1.compareTo(date)==1)  {
		System.out.print("TBD");
}
	
}
} import java.text.ParseException; ParseException java.text import java.text.SimpleDateFormat; SimpleDateFormat java.text import java.util.*; util.* java public class Main {
	public static void main(String[] args) throws ParseException {
	Scanner sc=new Scanner(System.in);

	String S=sc.next();
	SimpleDateFormat s=new SimpleDateFormat("yyyy/MM/dd");
	Date date1=s.parse(S);
	Date date=s.parse("2019/4/30");
	
	if((date1.compareTo(date)== -1)||(date1.compareTo(date)==0)) {
	System.out.print("Heisei");
	}
	
	else if(date1.compareTo(date)==1)  {
		System.out.print("TBD");
}
	
}
} Main public static void main(String[] args) throws ParseException {
	Scanner sc=new Scanner(System.in);

	String S=sc.next();
	SimpleDateFormat s=new SimpleDateFormat("yyyy/MM/dd");
	Date date1=s.parse(S);
	Date date=s.parse("2019/4/30");
	
	if((date1.compareTo(date)== -1)||(date1.compareTo(date)==0)) {
	System.out.print("Heisei");
	}
	
	else if(date1.compareTo(date)==1)  {
		System.out.print("TBD");
}
	
} main {
	Scanner sc=new Scanner(System.in);

	String S=sc.next();
	SimpleDateFormat s=new SimpleDateFormat("yyyy/MM/dd");
	Date date1=s.parse(S);
	Date date=s.parse("2019/4/30");
	
	if((date1.compareTo(date)== -1)||(date1.compareTo(date)==0)) {
	System.out.print("Heisei");
	}
	
	else if(date1.compareTo(date)==1)  {
		System.out.print("TBD");
}
	
} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String S=sc.next(); S sc.next() sc.next sc SimpleDateFormat s=new SimpleDateFormat("yyyy/MM/dd"); s new SimpleDateFormat("yyyy/MM/dd") Date date1=s.parse(S); date1 s.parse(S) s.parse s S Date date=s.parse("2019/4/30"); date s.parse("2019/4/30") s.parse s "2019/4/30" if((date1.compareTo(date)== -1)||(date1.compareTo(date)==0)) {
	System.out.print("Heisei");
	}
	
	else if(date1.compareTo(date)==1)  {
		System.out.print("TBD");
} (date1.compareTo(date)== -1)||(date1.compareTo(date)==0) (date1.compareTo(date)== -1) date1.compareTo(date) date1.compareTo date1 date -1 1 (date1.compareTo(date)==0) date1.compareTo(date) date1.compareTo date1 date 0 {
	System.out.print("Heisei");
	} System.out.print("Heisei") System.out.print System.out System System.out "Heisei" if(date1.compareTo(date)==1)  {
		System.out.print("TBD");
} date1.compareTo(date)==1 date1.compareTo(date) date1.compareTo date1 date 1 {
		System.out.print("TBD");
} System.out.print("TBD") System.out.print System.out System System.out "TBD" String[] args args public class Main {
	public static void main(String[] args) throws ParseException {
	Scanner sc=new Scanner(System.in);

	String S=sc.next();
	SimpleDateFormat s=new SimpleDateFormat("yyyy/MM/dd");
	Date date1=s.parse(S);
	Date date=s.parse("2019/4/30");
	
	if((date1.compareTo(date)== -1)||(date1.compareTo(date)==0)) {
	System.out.print("Heisei");
	}
	
	else if(date1.compareTo(date)==1)  {
		System.out.print("TBD");
}
	
}
} public class Main {
	public static void main(String[] args) throws ParseException {
	Scanner sc=new Scanner(System.in);

	String S=sc.next();
	SimpleDateFormat s=new SimpleDateFormat("yyyy/MM/dd");
	Date date1=s.parse(S);
	Date date=s.parse("2019/4/30");
	
	if((date1.compareTo(date)== -1)||(date1.compareTo(date)==0)) {
	System.out.print("Heisei");
	}
	
	else if(date1.compareTo(date)==1)  {
		System.out.print("TBD");
}
	
}
} Main
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
public class Main {
	public static void main(String[] args) throws ParseException {
	Scanner sc=new Scanner(System.in);

	String S=sc.next();
	SimpleDateFormat s=new SimpleDateFormat("yyyy/MM/dd");
	Date date1=s.parse(S);
	Date date=s.parse("2019/4/30");
	
	if((date1.compareTo(date)== -1)||(date1.compareTo(date)==0)) {
	System.out.print("Heisei");
	}
	
	else if(date1.compareTo(date)==1)  {
		System.out.print("TBD");
}
	
}
}
