import java.util.Scanner;

public class Main {

	public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();

		int y = Integer.parseInt(s.substring(0, 4));
		int m = Integer.parseInt(s.substring(5, 7));
		int d = Integer.parseInt(s.substring(8, 10));

		if(y < 2019) {
			System.out.println("Heisei");
		}else if(y == 2019 && m < 4) {
			System.out.println("Heisei");
		}else if(y == 2019 && m == 4 && d <= 30) {
			System.out.println("Heisei");
		}else {
			System.out.println("TBD");
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();

		int y = Integer.parseInt(s.substring(0, 4));
		int m = Integer.parseInt(s.substring(5, 7));
		int d = Integer.parseInt(s.substring(8, 10));

		if(y < 2019) {
			System.out.println("Heisei");
		}else if(y == 2019 && m < 4) {
			System.out.println("Heisei");
		}else if(y == 2019 && m == 4 && d <= 30) {
			System.out.println("Heisei");
		}else {
			System.out.println("TBD");
		}
	}
} Main public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();

		int y = Integer.parseInt(s.substring(0, 4));
		int m = Integer.parseInt(s.substring(5, 7));
		int d = Integer.parseInt(s.substring(8, 10));

		if(y < 2019) {
			System.out.println("Heisei");
		}else if(y == 2019 && m < 4) {
			System.out.println("Heisei");
		}else if(y == 2019 && m == 4 && d <= 30) {
			System.out.println("Heisei");
		}else {
			System.out.println("TBD");
		}
	} main {

		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();

		int y = Integer.parseInt(s.substring(0, 4));
		int m = Integer.parseInt(s.substring(5, 7));
		int d = Integer.parseInt(s.substring(8, 10));

		if(y < 2019) {
			System.out.println("Heisei");
		}else if(y == 2019 && m < 4) {
			System.out.println("Heisei");
		}else if(y == 2019 && m == 4 && d <= 30) {
			System.out.println("Heisei");
		}else {
			System.out.println("TBD");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc int y = Integer.parseInt(s.substring(0, 4)); y Integer.parseInt(s.substring(0, 4)) Integer.parseInt Integer s.substring(0, 4) s.substring s 0 4 int m = Integer.parseInt(s.substring(5, 7)); m Integer.parseInt(s.substring(5, 7)) Integer.parseInt Integer s.substring(5, 7) s.substring s 5 7 int d = Integer.parseInt(s.substring(8, 10)); d Integer.parseInt(s.substring(8, 10)) Integer.parseInt Integer s.substring(8, 10) s.substring s 8 10 if(y < 2019) {
			System.out.println("Heisei");
		}else if(y == 2019 && m < 4) {
			System.out.println("Heisei");
		}else if(y == 2019 && m == 4 && d <= 30) {
			System.out.println("Heisei");
		}else {
			System.out.println("TBD");
		} y < 2019 y 2019 {
			System.out.println("Heisei");
		} System.out.println("Heisei") System.out.println System.out System System.out "Heisei" if(y == 2019 && m < 4) {
			System.out.println("Heisei");
		}else if(y == 2019 && m == 4 && d <= 30) {
			System.out.println("Heisei");
		}else {
			System.out.println("TBD");
		} y == 2019 && m < 4 y == 2019 y 2019 m < 4 m 4 {
			System.out.println("Heisei");
		} System.out.println("Heisei") System.out.println System.out System System.out "Heisei" if(y == 2019 && m == 4 && d <= 30) {
			System.out.println("Heisei");
		}else {
			System.out.println("TBD");
		} y == 2019 && m == 4 && d <= 30 y == 2019 && m == 4 && d <= 30 y == 2019 y 2019 m == 4 m 4 d <= 30 d 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" String args[] args public class Main {

	public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();

		int y = Integer.parseInt(s.substring(0, 4));
		int m = Integer.parseInt(s.substring(5, 7));
		int d = Integer.parseInt(s.substring(8, 10));

		if(y < 2019) {
			System.out.println("Heisei");
		}else if(y == 2019 && m < 4) {
			System.out.println("Heisei");
		}else if(y == 2019 && m == 4 && d <= 30) {
			System.out.println("Heisei");
		}else {
			System.out.println("TBD");
		}
	}
} public class Main {

	public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();

		int y = Integer.parseInt(s.substring(0, 4));
		int m = Integer.parseInt(s.substring(5, 7));
		int d = Integer.parseInt(s.substring(8, 10));

		if(y < 2019) {
			System.out.println("Heisei");
		}else if(y == 2019 && m < 4) {
			System.out.println("Heisei");
		}else if(y == 2019 && m == 4 && d <= 30) {
			System.out.println("Heisei");
		}else {
			System.out.println("TBD");
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String args[]) {

		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();

		int y = Integer.parseInt(s.substring(0, 4));
		int m = Integer.parseInt(s.substring(5, 7));
		int d = Integer.parseInt(s.substring(8, 10));

		if(y < 2019) {
			System.out.println("Heisei");
		}else if(y == 2019 && m < 4) {
			System.out.println("Heisei");
		}else if(y == 2019 && m == 4 && d <= 30) {
			System.out.println("Heisei");
		}else {
			System.out.println("TBD");
		}
	}
}