import java.util.*;
import java.math.*;
 
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 整数の入
		String s = sc.next();
		String year =s.substring(0,4);
		String month =s.substring(5,7);
		String day =s.substring(8,10);

		int iYear = new Integer(year).intValue();
		int iMonth = new Integer(month).intValue();
		int iDay = new Integer(day).intValue();
		    // System.out.println(iYear);
		    // System.out.println(iMonth);
		    // System.out.println(iDay);
 
		if(iYear>2020){
		    System.out.println("TBD");
		}else if (iYear<2018){
		    System.out.println("Heisei");
		}else{
			if(iMonth>=5){
			    System.out.println("TBD");
			}else if (iMonth<=3){
			    System.out.println("Heisei");
			}else{
				if(iDay>=31){
				    System.out.println("TBD");
				}else if (iMonth<=29){
				    System.out.println("Heisei");
				}else{
				    System.out.println("Heisei");
				}
			}
		}
	}
} import java.util.*; util.* java import java.math.*; math.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 整数の入
		String s = sc.next();
		String year =s.substring(0,4);
		String month =s.substring(5,7);
		String day =s.substring(8,10);

		int iYear = new Integer(year).intValue();
		int iMonth = new Integer(month).intValue();
		int iDay = new Integer(day).intValue();
		    // System.out.println(iYear);
		    // System.out.println(iMonth);
		    // System.out.println(iDay);
 
		if(iYear>2020){
		    System.out.println("TBD");
		}else if (iYear<2018){
		    System.out.println("Heisei");
		}else{
			if(iMonth>=5){
			    System.out.println("TBD");
			}else if (iMonth<=3){
			    System.out.println("Heisei");
			}else{
				if(iDay>=31){
				    System.out.println("TBD");
				}else if (iMonth<=29){
				    System.out.println("Heisei");
				}else{
				    System.out.println("Heisei");
				}
			}
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 整数の入
		String s = sc.next();
		String year =s.substring(0,4);
		String month =s.substring(5,7);
		String day =s.substring(8,10);

		int iYear = new Integer(year).intValue();
		int iMonth = new Integer(month).intValue();
		int iDay = new Integer(day).intValue();
		    // System.out.println(iYear);
		    // System.out.println(iMonth);
		    // System.out.println(iDay);
 
		if(iYear>2020){
		    System.out.println("TBD");
		}else if (iYear<2018){
		    System.out.println("Heisei");
		}else{
			if(iMonth>=5){
			    System.out.println("TBD");
			}else if (iMonth<=3){
			    System.out.println("Heisei");
			}else{
				if(iDay>=31){
				    System.out.println("TBD");
				}else if (iMonth<=29){
				    System.out.println("Heisei");
				}else{
				    System.out.println("Heisei");
				}
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		// 整数の入
		String s = sc.next();
		String year =s.substring(0,4);
		String month =s.substring(5,7);
		String day =s.substring(8,10);

		int iYear = new Integer(year).intValue();
		int iMonth = new Integer(month).intValue();
		int iDay = new Integer(day).intValue();
		    // System.out.println(iYear);
		    // System.out.println(iMonth);
		    // System.out.println(iDay);
 
		if(iYear>2020){
		    System.out.println("TBD");
		}else if (iYear<2018){
		    System.out.println("Heisei");
		}else{
			if(iMonth>=5){
			    System.out.println("TBD");
			}else if (iMonth<=3){
			    System.out.println("Heisei");
			}else{
				if(iDay>=31){
				    System.out.println("TBD");
				}else if (iMonth<=29){
				    System.out.println("Heisei");
				}else{
				    System.out.println("Heisei");
				}
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String year =s.substring(0,4); year s.substring(0,4) s.substring s 0 4 String month =s.substring(5,7); month s.substring(5,7) s.substring s 5 7 String day =s.substring(8,10); day s.substring(8,10) s.substring s 8 10 int iYear = new Integer(year).intValue(); iYear new Integer(year).intValue() new Integer(year).intValue new Integer(year) int iMonth = new Integer(month).intValue(); iMonth new Integer(month).intValue() new Integer(month).intValue new Integer(month) int iDay = new Integer(day).intValue(); iDay new Integer(day).intValue() new Integer(day).intValue new Integer(day) if(iYear>2020){
		    System.out.println("TBD");
		}else if (iYear<2018){
		    System.out.println("Heisei");
		}else{
			if(iMonth>=5){
			    System.out.println("TBD");
			}else if (iMonth<=3){
			    System.out.println("Heisei");
			}else{
				if(iDay>=31){
				    System.out.println("TBD");
				}else if (iMonth<=29){
				    System.out.println("Heisei");
				}else{
				    System.out.println("Heisei");
				}
			}
		} iYear>2020 iYear 2020 {
		    System.out.println("TBD");
		} System.out.println("TBD") System.out.println System.out System System.out "TBD" if (iYear<2018){
		    System.out.println("Heisei");
		}else{
			if(iMonth>=5){
			    System.out.println("TBD");
			}else if (iMonth<=3){
			    System.out.println("Heisei");
			}else{
				if(iDay>=31){
				    System.out.println("TBD");
				}else if (iMonth<=29){
				    System.out.println("Heisei");
				}else{
				    System.out.println("Heisei");
				}
			}
		} iYear<2018 iYear 2018 {
		    System.out.println("Heisei");
		} System.out.println("Heisei") System.out.println System.out System System.out "Heisei" {
			if(iMonth>=5){
			    System.out.println("TBD");
			}else if (iMonth<=3){
			    System.out.println("Heisei");
			}else{
				if(iDay>=31){
				    System.out.println("TBD");
				}else if (iMonth<=29){
				    System.out.println("Heisei");
				}else{
				    System.out.println("Heisei");
				}
			}
		} if(iMonth>=5){
			    System.out.println("TBD");
			}else if (iMonth<=3){
			    System.out.println("Heisei");
			}else{
				if(iDay>=31){
				    System.out.println("TBD");
				}else if (iMonth<=29){
				    System.out.println("Heisei");
				}else{
				    System.out.println("Heisei");
				}
			} iMonth>=5 iMonth 5 {
			    System.out.println("TBD");
			} System.out.println("TBD") System.out.println System.out System System.out "TBD" if (iMonth<=3){
			    System.out.println("Heisei");
			}else{
				if(iDay>=31){
				    System.out.println("TBD");
				}else if (iMonth<=29){
				    System.out.println("Heisei");
				}else{
				    System.out.println("Heisei");
				}
			} iMonth<=3 iMonth 3 {
			    System.out.println("Heisei");
			} System.out.println("Heisei") System.out.println System.out System System.out "Heisei" {
				if(iDay>=31){
				    System.out.println("TBD");
				}else if (iMonth<=29){
				    System.out.println("Heisei");
				}else{
				    System.out.println("Heisei");
				}
			} if(iDay>=31){
				    System.out.println("TBD");
				}else if (iMonth<=29){
				    System.out.println("Heisei");
				}else{
				    System.out.println("Heisei");
				} iDay>=31 iDay 31 {
				    System.out.println("TBD");
				} System.out.println("TBD") System.out.println System.out System System.out "TBD" if (iMonth<=29){
				    System.out.println("Heisei");
				}else{
				    System.out.println("Heisei");
				} iMonth<=29 iMonth 29 {
				    System.out.println("Heisei");
				} System.out.println("Heisei") System.out.println System.out System System.out "Heisei" {
				    System.out.println("Heisei");
				} System.out.println("Heisei") System.out.println System.out System System.out "Heisei" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 整数の入
		String s = sc.next();
		String year =s.substring(0,4);
		String month =s.substring(5,7);
		String day =s.substring(8,10);

		int iYear = new Integer(year).intValue();
		int iMonth = new Integer(month).intValue();
		int iDay = new Integer(day).intValue();
		    // System.out.println(iYear);
		    // System.out.println(iMonth);
		    // System.out.println(iDay);
 
		if(iYear>2020){
		    System.out.println("TBD");
		}else if (iYear<2018){
		    System.out.println("Heisei");
		}else{
			if(iMonth>=5){
			    System.out.println("TBD");
			}else if (iMonth<=3){
			    System.out.println("Heisei");
			}else{
				if(iDay>=31){
				    System.out.println("TBD");
				}else if (iMonth<=29){
				    System.out.println("Heisei");
				}else{
				    System.out.println("Heisei");
				}
			}
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 整数の入
		String s = sc.next();
		String year =s.substring(0,4);
		String month =s.substring(5,7);
		String day =s.substring(8,10);

		int iYear = new Integer(year).intValue();
		int iMonth = new Integer(month).intValue();
		int iDay = new Integer(day).intValue();
		    // System.out.println(iYear);
		    // System.out.println(iMonth);
		    // System.out.println(iDay);
 
		if(iYear>2020){
		    System.out.println("TBD");
		}else if (iYear<2018){
		    System.out.println("Heisei");
		}else{
			if(iMonth>=5){
			    System.out.println("TBD");
			}else if (iMonth<=3){
			    System.out.println("Heisei");
			}else{
				if(iDay>=31){
				    System.out.println("TBD");
				}else if (iMonth<=29){
				    System.out.println("Heisei");
				}else{
				    System.out.println("Heisei");
				}
			}
		}
	}
} Main
import java.util.*;
import java.math.*;
 
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 整数の入
		String s = sc.next();
		String year =s.substring(0,4);
		String month =s.substring(5,7);
		String day =s.substring(8,10);

		int iYear = new Integer(year).intValue();
		int iMonth = new Integer(month).intValue();
		int iDay = new Integer(day).intValue();
		    // System.out.println(iYear);
		    // System.out.println(iMonth);
		    // System.out.println(iDay);
 
		if(iYear>2020){
		    System.out.println("TBD");
		}else if (iYear<2018){
		    System.out.println("Heisei");
		}else{
			if(iMonth>=5){
			    System.out.println("TBD");
			}else if (iMonth<=3){
			    System.out.println("Heisei");
			}else{
				if(iDay>=31){
				    System.out.println("TBD");
				}else if (iMonth<=29){
				    System.out.println("Heisei");
				}else{
				    System.out.println("Heisei");
				}
			}
		}
	}
}
