import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split("/");

		int y = Integer.parseInt(str[0]);
		int m = Integer.parseInt(str[1]);
		int d = Integer.parseInt(str[2]);

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

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split("/");

		int y = Integer.parseInt(str[0]);
		int m = Integer.parseInt(str[1]);
		int d = Integer.parseInt(str[2]);

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

		String str[] = br.readLine().split("/");

		int y = Integer.parseInt(str[0]);
		int m = Integer.parseInt(str[1]);
		int d = Integer.parseInt(str[2]);

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

		String str[] = br.readLine().split("/");

		int y = Integer.parseInt(str[0]);
		int m = Integer.parseInt(str[1]);
		int d = Integer.parseInt(str[2]);

		if (y <= 2019) {
			if (m == 4 && d <= 30) {
				System.out.println("Heisei");
			} else {
				if (m <= 3) {
					System.out.println("Heisei");
				} else {
					System.out.println("TBD");
				}
			}
		} else {
			System.out.println("TBD");
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str[] = br.readLine().split("/"); str br.readLine().split("/") br.readLine().split br.readLine() br.readLine br "/" int y = Integer.parseInt(str[0]); y Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int m = Integer.parseInt(str[1]); m Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 int d = Integer.parseInt(str[2]); d Integer.parseInt(str[2]) Integer.parseInt Integer str[2] str 2 if (y <= 2019) {
			if (m == 4 && d <= 30) {
				System.out.println("Heisei");
			} else {
				if (m <= 3) {
					System.out.println("Heisei");
				} else {
					System.out.println("TBD");
				}
			}
		} else {
			System.out.println("TBD");
		} y <= 2019 y 2019 {
			if (m == 4 && d <= 30) {
				System.out.println("Heisei");
			} else {
				if (m <= 3) {
					System.out.println("Heisei");
				} else {
					System.out.println("TBD");
				}
			}
		} if (m == 4 && d <= 30) {
				System.out.println("Heisei");
			} else {
				if (m <= 3) {
					System.out.println("Heisei");
				} else {
					System.out.println("TBD");
				}
			} m == 4 && d <= 30 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" {
				if (m <= 3) {
					System.out.println("Heisei");
				} else {
					System.out.println("TBD");
				}
			} if (m <= 3) {
					System.out.println("Heisei");
				} else {
					System.out.println("TBD");
				} m <= 3 m 3 {
					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" {
			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) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split("/");

		int y = Integer.parseInt(str[0]);
		int m = Integer.parseInt(str[1]);
		int d = Integer.parseInt(str[2]);

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

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split("/");

		int y = Integer.parseInt(str[0]);
		int m = Integer.parseInt(str[1]);
		int d = Integer.parseInt(str[2]);

		if (y <= 2019) {
			if (m == 4 && d <= 30) {
				System.out.println("Heisei");
			} else {
				if (m <= 3) {
					System.out.println("Heisei");
				} else {
					System.out.println("TBD");
				}
			}
		} else {
			System.out.println("TBD");
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str[] = br.readLine().split("/");

		int y = Integer.parseInt(str[0]);
		int m = Integer.parseInt(str[1]);
		int d = Integer.parseInt(str[2]);

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