import java.util.*;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String date = sc.next();
			int year = Integer.valueOf(date.substring(0, 4)).intValue();
			int month = Integer.valueOf(date.substring(5, 7)).intValue();
			int day = Integer.valueOf(date.substring(8, 9)).intValue();

			int kjdatenum = 2019 * 10000 + 4 * 100 + 30;
			if (kjdatenum >= (year * 10000 + month * 100 + day)) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		}
	}
} import java.util.*; util.* java public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String date = sc.next();
			int year = Integer.valueOf(date.substring(0, 4)).intValue();
			int month = Integer.valueOf(date.substring(5, 7)).intValue();
			int day = Integer.valueOf(date.substring(8, 9)).intValue();

			int kjdatenum = 2019 * 10000 + 4 * 100 + 30;
			if (kjdatenum >= (year * 10000 + month * 100 + day)) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		}
	}
} Main /**
	 * @param args
	 */
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String date = sc.next();
			int year = Integer.valueOf(date.substring(0, 4)).intValue();
			int month = Integer.valueOf(date.substring(5, 7)).intValue();
			int day = Integer.valueOf(date.substring(8, 9)).intValue();

			int kjdatenum = 2019 * 10000 + 4 * 100 + 30;
			if (kjdatenum >= (year * 10000 + month * 100 + day)) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		}
	} main {
		try (Scanner sc = new Scanner(System.in)) {
			String date = sc.next();
			int year = Integer.valueOf(date.substring(0, 4)).intValue();
			int month = Integer.valueOf(date.substring(5, 7)).intValue();
			int day = Integer.valueOf(date.substring(8, 9)).intValue();

			int kjdatenum = 2019 * 10000 + 4 * 100 + 30;
			if (kjdatenum >= (year * 10000 + month * 100 + day)) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		}
	} try (Scanner sc = new Scanner(System.in)) {
			String date = sc.next();
			int year = Integer.valueOf(date.substring(0, 4)).intValue();
			int month = Integer.valueOf(date.substring(5, 7)).intValue();
			int day = Integer.valueOf(date.substring(8, 9)).intValue();

			int kjdatenum = 2019 * 10000 + 4 * 100 + 30;
			if (kjdatenum >= (year * 10000 + month * 100 + day)) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		} {
			String date = sc.next();
			int year = Integer.valueOf(date.substring(0, 4)).intValue();
			int month = Integer.valueOf(date.substring(5, 7)).intValue();
			int day = Integer.valueOf(date.substring(8, 9)).intValue();

			int kjdatenum = 2019 * 10000 + 4 * 100 + 30;
			if (kjdatenum >= (year * 10000 + month * 100 + day)) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) String date = sc.next(); date sc.next() sc.next sc int year = Integer.valueOf(date.substring(0, 4)).intValue(); year Integer.valueOf(date.substring(0, 4)).intValue() Integer.valueOf(date.substring(0, 4)).intValue Integer.valueOf(date.substring(0, 4)) Integer.valueOf Integer date.substring(0, 4) date.substring date 0 4 int month = Integer.valueOf(date.substring(5, 7)).intValue(); month Integer.valueOf(date.substring(5, 7)).intValue() Integer.valueOf(date.substring(5, 7)).intValue Integer.valueOf(date.substring(5, 7)) Integer.valueOf Integer date.substring(5, 7) date.substring date 5 7 int day = Integer.valueOf(date.substring(8, 9)).intValue(); day Integer.valueOf(date.substring(8, 9)).intValue() Integer.valueOf(date.substring(8, 9)).intValue Integer.valueOf(date.substring(8, 9)) Integer.valueOf Integer date.substring(8, 9) date.substring date 8 9 int kjdatenum = 2019 * 10000 + 4 * 100 + 30; kjdatenum 2019 * 10000 + 4 * 100 + 30 2019 * 10000 + 4 * 100 + 30 2019 * 10000 2019 10000 4 * 100 4 100 30 if (kjdatenum >= (year * 10000 + month * 100 + day)) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			} kjdatenum >= (year * 10000 + month * 100 + day) kjdatenum (year * 10000 + month * 100 + day) year * 10000 + month * 100 + day year * 10000 year 10000 month * 100 month 100 day {
				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 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String date = sc.next();
			int year = Integer.valueOf(date.substring(0, 4)).intValue();
			int month = Integer.valueOf(date.substring(5, 7)).intValue();
			int day = Integer.valueOf(date.substring(8, 9)).intValue();

			int kjdatenum = 2019 * 10000 + 4 * 100 + 30;
			if (kjdatenum >= (year * 10000 + month * 100 + day)) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		}
	}
} public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String date = sc.next();
			int year = Integer.valueOf(date.substring(0, 4)).intValue();
			int month = Integer.valueOf(date.substring(5, 7)).intValue();
			int day = Integer.valueOf(date.substring(8, 9)).intValue();

			int kjdatenum = 2019 * 10000 + 4 * 100 + 30;
			if (kjdatenum >= (year * 10000 + month * 100 + day)) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		}
	}
} Main
import java.util.*;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String date = sc.next();
			int year = Integer.valueOf(date.substring(0, 4)).intValue();
			int month = Integer.valueOf(date.substring(5, 7)).intValue();
			int day = Integer.valueOf(date.substring(8, 9)).intValue();

			int kjdatenum = 2019 * 10000 + 4 * 100 + 30;
			if (kjdatenum >= (year * 10000 + month * 100 + day)) {
				System.out.println("Heisei");
			} else {
				System.out.println("TBD");
			}
		}
	}
}