import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws ParseException {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
		Date baseDate = sdf.parse("2019/04/30");
		try(Scanner sc = new Scanner(System.in)){
				String ret = baseDate.compareTo(sdf.parse(sc.nextLine())) == -1 ? "TBD" : "Heisei";
				System.out.println(ret);
			}
		}	
} import java.text.ParseException; ParseException java.text import java.text.SimpleDateFormat; SimpleDateFormat java.text import java.util.Date; Date java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws ParseException {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
		Date baseDate = sdf.parse("2019/04/30");
		try(Scanner sc = new Scanner(System.in)){
				String ret = baseDate.compareTo(sdf.parse(sc.nextLine())) == -1 ? "TBD" : "Heisei";
				System.out.println(ret);
			}
		}	
} Main public static void main(String[] args) throws ParseException {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
		Date baseDate = sdf.parse("2019/04/30");
		try(Scanner sc = new Scanner(System.in)){
				String ret = baseDate.compareTo(sdf.parse(sc.nextLine())) == -1 ? "TBD" : "Heisei";
				System.out.println(ret);
			}
		} main {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
		Date baseDate = sdf.parse("2019/04/30");
		try(Scanner sc = new Scanner(System.in)){
				String ret = baseDate.compareTo(sdf.parse(sc.nextLine())) == -1 ? "TBD" : "Heisei";
				System.out.println(ret);
			}
		} SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd"); sdf new SimpleDateFormat("yyyy/MM/dd") Date baseDate = sdf.parse("2019/04/30"); baseDate sdf.parse("2019/04/30") sdf.parse sdf "2019/04/30" try(Scanner sc = new Scanner(System.in)){
				String ret = baseDate.compareTo(sdf.parse(sc.nextLine())) == -1 ? "TBD" : "Heisei";
				System.out.println(ret);
			} {
				String ret = baseDate.compareTo(sdf.parse(sc.nextLine())) == -1 ? "TBD" : "Heisei";
				System.out.println(ret);
			} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) String ret = baseDate.compareTo(sdf.parse(sc.nextLine())) == -1 ? "TBD" : "Heisei"; ret baseDate.compareTo(sdf.parse(sc.nextLine())) == -1 ? "TBD" : "Heisei" baseDate.compareTo(sdf.parse(sc.nextLine())) == -1 baseDate.compareTo(sdf.parse(sc.nextLine())) baseDate.compareTo baseDate sdf.parse(sc.nextLine()) sdf.parse sdf sc.nextLine() sc.nextLine sc -1 1 "TBD" "Heisei" System.out.println(ret) System.out.println System.out System System.out ret String[] args args public class Main {

	public static void main(String[] args) throws ParseException {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
		Date baseDate = sdf.parse("2019/04/30");
		try(Scanner sc = new Scanner(System.in)){
				String ret = baseDate.compareTo(sdf.parse(sc.nextLine())) == -1 ? "TBD" : "Heisei";
				System.out.println(ret);
			}
		}	
} public class Main {

	public static void main(String[] args) throws ParseException {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
		Date baseDate = sdf.parse("2019/04/30");
		try(Scanner sc = new Scanner(System.in)){
				String ret = baseDate.compareTo(sdf.parse(sc.nextLine())) == -1 ? "TBD" : "Heisei";
				System.out.println(ret);
			}
		}	
} Main
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws ParseException {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
		Date baseDate = sdf.parse("2019/04/30");
		try(Scanner sc = new Scanner(System.in)){
				String ret = baseDate.compareTo(sdf.parse(sc.nextLine())) == -1 ? "TBD" : "Heisei";
				System.out.println(ret);
			}
		}	
}
