import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();

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

		String ans = "TBD";

		if (y <= 2019) {
			if (m <= 4) {
				if (d <= 30) {
					ans = "Heisei";
				}
			}
		}

		System.out.println(ans);

		sc.close();
	}
} 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.next();

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

		String ans = "TBD";

		if (y <= 2019) {
			if (m <= 4) {
				if (d <= 30) {
					ans = "Heisei";
				}
			}
		}

		System.out.println(ans);

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();

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

		String ans = "TBD";

		if (y <= 2019) {
			if (m <= 4) {
				if (d <= 30) {
					ans = "Heisei";
				}
			}
		}

		System.out.println(ans);

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();

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

		String ans = "TBD";

		if (y <= 2019) {
			if (m <= 4) {
				if (d <= 30) {
					ans = "Heisei";
				}
			}
		}

		System.out.println(ans);

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next 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)); d Integer.parseInt(s.substring(8)) Integer.parseInt Integer s.substring(8) s.substring s 8 String ans = "TBD"; ans "TBD" if (y <= 2019) {
			if (m <= 4) {
				if (d <= 30) {
					ans = "Heisei";
				}
			}
		} y <= 2019 y 2019 {
			if (m <= 4) {
				if (d <= 30) {
					ans = "Heisei";
				}
			}
		} if (m <= 4) {
				if (d <= 30) {
					ans = "Heisei";
				}
			} m <= 4 m 4 {
				if (d <= 30) {
					ans = "Heisei";
				}
			} if (d <= 30) {
					ans = "Heisei";
				} d <= 30 d 30 {
					ans = "Heisei";
				} ans = "Heisei" ans "Heisei" System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();

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

		String ans = "TBD";

		if (y <= 2019) {
			if (m <= 4) {
				if (d <= 30) {
					ans = "Heisei";
				}
			}
		}

		System.out.println(ans);

		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();

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

		String ans = "TBD";

		if (y <= 2019) {
			if (m <= 4) {
				if (d <= 30) {
					ans = "Heisei";
				}
			}
		}

		System.out.println(ans);

		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();

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

		String ans = "TBD";

		if (y <= 2019) {
			if (m <= 4) {
				if (d <= 30) {
					ans = "Heisei";
				}
			}
		}

		System.out.println(ans);

		sc.close();
	}
}
