
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		String str=scn.next();
		int num=10,x=10;
		num*=str.charAt(0)-'0';
		num+=str.charAt(1)-'0';
		num*=10;
		num+=str.charAt(2)-'0';
		num*=10;
		num+=str.charAt(3)-'0';
		x*=str.charAt(5)-'0';
		x+=str.charAt(6)-'0';
		if(num>=2019&&x>4) {
			System.out.println("TBD");
		}else {
			System.out.println("Heisei");
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		String str=scn.next();
		int num=10,x=10;
		num*=str.charAt(0)-'0';
		num+=str.charAt(1)-'0';
		num*=10;
		num+=str.charAt(2)-'0';
		num*=10;
		num+=str.charAt(3)-'0';
		x*=str.charAt(5)-'0';
		x+=str.charAt(6)-'0';
		if(num>=2019&&x>4) {
			System.out.println("TBD");
		}else {
			System.out.println("Heisei");
		}
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		String str=scn.next();
		int num=10,x=10;
		num*=str.charAt(0)-'0';
		num+=str.charAt(1)-'0';
		num*=10;
		num+=str.charAt(2)-'0';
		num*=10;
		num+=str.charAt(3)-'0';
		x*=str.charAt(5)-'0';
		x+=str.charAt(6)-'0';
		if(num>=2019&&x>4) {
			System.out.println("TBD");
		}else {
			System.out.println("Heisei");
		}
	} main {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		String str=scn.next();
		int num=10,x=10;
		num*=str.charAt(0)-'0';
		num+=str.charAt(1)-'0';
		num*=10;
		num+=str.charAt(2)-'0';
		num*=10;
		num+=str.charAt(3)-'0';
		x*=str.charAt(5)-'0';
		x+=str.charAt(6)-'0';
		if(num>=2019&&x>4) {
			System.out.println("TBD");
		}else {
			System.out.println("Heisei");
		}
	} Scanner scn=new Scanner(System.in); scn new Scanner(System.in) String str=scn.next(); str scn.next() scn.next scn int num=10 num 10 x=10; x 10 num*=str.charAt(0)-'0' num str.charAt(0)-'0' str.charAt(0) str.charAt str 0 '0' num+=str.charAt(1)-'0' num str.charAt(1)-'0' str.charAt(1) str.charAt str 1 '0' num*=10 num 10 num+=str.charAt(2)-'0' num str.charAt(2)-'0' str.charAt(2) str.charAt str 2 '0' num*=10 num 10 num+=str.charAt(3)-'0' num str.charAt(3)-'0' str.charAt(3) str.charAt str 3 '0' x*=str.charAt(5)-'0' x str.charAt(5)-'0' str.charAt(5) str.charAt str 5 '0' x+=str.charAt(6)-'0' x str.charAt(6)-'0' str.charAt(6) str.charAt str 6 '0' if(num>=2019&&x>4) {
			System.out.println("TBD");
		}else {
			System.out.println("Heisei");
		} num>=2019&&x>4 num>=2019 num 2019 x>4 x 4 {
			System.out.println("TBD");
		} System.out.println("TBD") System.out.println System.out System System.out "TBD" {
			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) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		String str=scn.next();
		int num=10,x=10;
		num*=str.charAt(0)-'0';
		num+=str.charAt(1)-'0';
		num*=10;
		num+=str.charAt(2)-'0';
		num*=10;
		num+=str.charAt(3)-'0';
		x*=str.charAt(5)-'0';
		x+=str.charAt(6)-'0';
		if(num>=2019&&x>4) {
			System.out.println("TBD");
		}else {
			System.out.println("Heisei");
		}
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		String str=scn.next();
		int num=10,x=10;
		num*=str.charAt(0)-'0';
		num+=str.charAt(1)-'0';
		num*=10;
		num+=str.charAt(2)-'0';
		num*=10;
		num+=str.charAt(3)-'0';
		x*=str.charAt(5)-'0';
		x+=str.charAt(6)-'0';
		if(num>=2019&&x>4) {
			System.out.println("TBD");
		}else {
			System.out.println("Heisei");
		}
	}

} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		String str=scn.next();
		int num=10,x=10;
		num*=str.charAt(0)-'0';
		num+=str.charAt(1)-'0';
		num*=10;
		num+=str.charAt(2)-'0';
		num*=10;
		num+=str.charAt(3)-'0';
		x*=str.charAt(5)-'0';
		x+=str.charAt(6)-'0';
		if(num>=2019&&x>4) {
			System.out.println("TBD");
		}else {
			System.out.println("Heisei");
		}
	}

}
