import java.util.*;

class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int a = Integer.parseInt(s.substring(0,4));
		int b = Integer.parseInt(s.substring(5,7));
		int c = Integer.parseInt(s.substring(8,10));
		int ans = a*10000+b*100+c;
		if(ans > 20190430){
			System.out.print("TBD");
		}else{
			System.out.print("Heisei");
		}
		//System.out.print(ans);
	}
} import java.util.*; util.* java class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int a = Integer.parseInt(s.substring(0,4));
		int b = Integer.parseInt(s.substring(5,7));
		int c = Integer.parseInt(s.substring(8,10));
		int ans = a*10000+b*100+c;
		if(ans > 20190430){
			System.out.print("TBD");
		}else{
			System.out.print("Heisei");
		}
		//System.out.print(ans);
	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int a = Integer.parseInt(s.substring(0,4));
		int b = Integer.parseInt(s.substring(5,7));
		int c = Integer.parseInt(s.substring(8,10));
		int ans = a*10000+b*100+c;
		if(ans > 20190430){
			System.out.print("TBD");
		}else{
			System.out.print("Heisei");
		}
		//System.out.print(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int a = Integer.parseInt(s.substring(0,4));
		int b = Integer.parseInt(s.substring(5,7));
		int c = Integer.parseInt(s.substring(8,10));
		int ans = a*10000+b*100+c;
		if(ans > 20190430){
			System.out.print("TBD");
		}else{
			System.out.print("Heisei");
		}
		//System.out.print(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int a = Integer.parseInt(s.substring(0,4)); a Integer.parseInt(s.substring(0,4)) Integer.parseInt Integer s.substring(0,4) s.substring s 0 4 int b = Integer.parseInt(s.substring(5,7)); b Integer.parseInt(s.substring(5,7)) Integer.parseInt Integer s.substring(5,7) s.substring s 5 7 int c = Integer.parseInt(s.substring(8,10)); c Integer.parseInt(s.substring(8,10)) Integer.parseInt Integer s.substring(8,10) s.substring s 8 10 int ans = a*10000+b*100+c; ans a*10000+b*100+c a*10000+b*100+c a*10000 a 10000 b*100 b 100 c if(ans > 20190430){
			System.out.print("TBD");
		}else{
			System.out.print("Heisei");
		} ans > 20190430 ans 20190430 {
			System.out.print("TBD");
		} System.out.print("TBD") System.out.print System.out System System.out "TBD" {
			System.out.print("Heisei");
		} System.out.print("Heisei") System.out.print System.out System System.out "Heisei" String args[] args
import java.util.*;

class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int a = Integer.parseInt(s.substring(0,4));
		int b = Integer.parseInt(s.substring(5,7));
		int c = Integer.parseInt(s.substring(8,10));
		int ans = a*10000+b*100+c;
		if(ans > 20190430){
			System.out.print("TBD");
		}else{
			System.out.print("Heisei");
		}
		//System.out.print(ans);
	}
}
