import java.time.LocalDate;
import java.util.Scanner;

public class Main {

	private static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		String s = sc.next();
		LocalDate base = LocalDate.of(2019, 4, 30);
		LocalDate input = LocalDate.of(Integer.valueOf(s.substring(0, 4)),
				Integer.valueOf(s.substring(5, 7)),
				Integer.valueOf(s.substring(8, 10)));
		System.out.println(input.isAfter(base) ? "TBD" : "Heisei");
	}
} import java.time.LocalDate; LocalDate java.time import java.util.Scanner; Scanner java.util public class Main {

	private static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		String s = sc.next();
		LocalDate base = LocalDate.of(2019, 4, 30);
		LocalDate input = LocalDate.of(Integer.valueOf(s.substring(0, 4)),
				Integer.valueOf(s.substring(5, 7)),
				Integer.valueOf(s.substring(8, 10)));
		System.out.println(input.isAfter(base) ? "TBD" : "Heisei");
	}
} Main private static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
		String s = sc.next();
		LocalDate base = LocalDate.of(2019, 4, 30);
		LocalDate input = LocalDate.of(Integer.valueOf(s.substring(0, 4)),
				Integer.valueOf(s.substring(5, 7)),
				Integer.valueOf(s.substring(8, 10)));
		System.out.println(input.isAfter(base) ? "TBD" : "Heisei");
	} main {
		String s = sc.next();
		LocalDate base = LocalDate.of(2019, 4, 30);
		LocalDate input = LocalDate.of(Integer.valueOf(s.substring(0, 4)),
				Integer.valueOf(s.substring(5, 7)),
				Integer.valueOf(s.substring(8, 10)));
		System.out.println(input.isAfter(base) ? "TBD" : "Heisei");
	} String s = sc.next(); s sc.next() sc.next sc LocalDate base = LocalDate.of(2019, 4, 30); base LocalDate.of(2019, 4, 30) LocalDate.of LocalDate 2019 4 30 LocalDate input = LocalDate.of(Integer.valueOf(s.substring(0, 4)),
				Integer.valueOf(s.substring(5, 7)),
				Integer.valueOf(s.substring(8, 10))); input LocalDate.of(Integer.valueOf(s.substring(0, 4)),
				Integer.valueOf(s.substring(5, 7)),
				Integer.valueOf(s.substring(8, 10))) LocalDate.of LocalDate Integer.valueOf(s.substring(0, 4)) Integer.valueOf Integer s.substring(0, 4) s.substring s 0 4 Integer.valueOf(s.substring(5, 7)) Integer.valueOf Integer s.substring(5, 7) s.substring s 5 7 Integer.valueOf(s.substring(8, 10)) Integer.valueOf Integer s.substring(8, 10) s.substring s 8 10 System.out.println(input.isAfter(base) ? "TBD" : "Heisei") System.out.println System.out System System.out input.isAfter(base) ? "TBD" : "Heisei" input.isAfter(base) input.isAfter input base "TBD" "Heisei" String[] args args public class Main {

	private static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		String s = sc.next();
		LocalDate base = LocalDate.of(2019, 4, 30);
		LocalDate input = LocalDate.of(Integer.valueOf(s.substring(0, 4)),
				Integer.valueOf(s.substring(5, 7)),
				Integer.valueOf(s.substring(8, 10)));
		System.out.println(input.isAfter(base) ? "TBD" : "Heisei");
	}
} public class Main {

	private static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		String s = sc.next();
		LocalDate base = LocalDate.of(2019, 4, 30);
		LocalDate input = LocalDate.of(Integer.valueOf(s.substring(0, 4)),
				Integer.valueOf(s.substring(5, 7)),
				Integer.valueOf(s.substring(8, 10)));
		System.out.println(input.isAfter(base) ? "TBD" : "Heisei");
	}
} Main
import java.time.LocalDate;
import java.util.Scanner;

public class Main {

	private static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		String s = sc.next();
		LocalDate base = LocalDate.of(2019, 4, 30);
		LocalDate input = LocalDate.of(Integer.valueOf(s.substring(0, 4)),
				Integer.valueOf(s.substring(5, 7)),
				Integer.valueOf(s.substring(8, 10)));
		System.out.println(input.isAfter(base) ? "TBD" : "Heisei");
	}
}