import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		
		String s = scanner.next();
		
		scanner.close();
		
		int year  = Integer.valueOf(s.substring(0, 4));
		int month = Integer.valueOf(s.substring(5, 7));
		int day   = Integer.valueOf(s.substring(8, 10));
		
		int value = year*10000 + month*100 + day;

		if (value <= 20190430) {
			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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		
		String s = scanner.next();
		
		scanner.close();
		
		int year  = Integer.valueOf(s.substring(0, 4));
		int month = Integer.valueOf(s.substring(5, 7));
		int day   = Integer.valueOf(s.substring(8, 10));
		
		int value = year*10000 + month*100 + day;

		if (value <= 20190430) {
			System.out.println("Heisei");
		} else {
			System.out.println("TBD");
		}
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		
		String s = scanner.next();
		
		scanner.close();
		
		int year  = Integer.valueOf(s.substring(0, 4));
		int month = Integer.valueOf(s.substring(5, 7));
		int day   = Integer.valueOf(s.substring(8, 10));
		
		int value = year*10000 + month*100 + day;

		if (value <= 20190430) {
			System.out.println("Heisei");
		} else {
			System.out.println("TBD");
		}
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		
		String s = scanner.next();
		
		scanner.close();
		
		int year  = Integer.valueOf(s.substring(0, 4));
		int month = Integer.valueOf(s.substring(5, 7));
		int day   = Integer.valueOf(s.substring(8, 10));
		
		int value = year*10000 + month*100 + day;

		if (value <= 20190430) {
			System.out.println("Heisei");
		} else {
			System.out.println("TBD");
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s = scanner.next(); s scanner.next() scanner.next scanner scanner.close() scanner.close scanner int year  = Integer.valueOf(s.substring(0, 4)); year Integer.valueOf(s.substring(0, 4)) Integer.valueOf Integer s.substring(0, 4) s.substring s 0 4 int month = Integer.valueOf(s.substring(5, 7)); month Integer.valueOf(s.substring(5, 7)) Integer.valueOf Integer s.substring(5, 7) s.substring s 5 7 int day   = Integer.valueOf(s.substring(8, 10)); day Integer.valueOf(s.substring(8, 10)) Integer.valueOf Integer s.substring(8, 10) s.substring s 8 10 int value = year*10000 + month*100 + day; value year*10000 + month*100 + day year*10000 + month*100 + day year*10000 year 10000 month*100 month 100 day if (value <= 20190430) {
			System.out.println("Heisei");
		} else {
			System.out.println("TBD");
		} value <= 20190430 value 20190430 {
			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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		
		String s = scanner.next();
		
		scanner.close();
		
		int year  = Integer.valueOf(s.substring(0, 4));
		int month = Integer.valueOf(s.substring(5, 7));
		int day   = Integer.valueOf(s.substring(8, 10));
		
		int value = year*10000 + month*100 + day;

		if (value <= 20190430) {
			System.out.println("Heisei");
		} else {
			System.out.println("TBD");
		}
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		
		String s = scanner.next();
		
		scanner.close();
		
		int year  = Integer.valueOf(s.substring(0, 4));
		int month = Integer.valueOf(s.substring(5, 7));
		int day   = Integer.valueOf(s.substring(8, 10));
		
		int value = year*10000 + month*100 + day;

		if (value <= 20190430) {
			System.out.println("Heisei");
		} else {
			System.out.println("TBD");
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		
		String s = scanner.next();
		
		scanner.close();
		
		int year  = Integer.valueOf(s.substring(0, 4));
		int month = Integer.valueOf(s.substring(5, 7));
		int day   = Integer.valueOf(s.substring(8, 10));
		
		int value = year*10000 + month*100 + day;

		if (value <= 20190430) {
			System.out.println("Heisei");
		} else {
			System.out.println("TBD");
		}
	}

}