import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.chrono.MinguoChronology;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws ParseException {

		Scanner sc = new Scanner(System.in);
		String a = sc.nextLine();
		SimpleDateFormat sd = new SimpleDateFormat();
		sd.applyPattern("yyyy/MM/dd");
		Date date = sd.parse(a);
		String b = "2019/04/30";
		Date hikaku = sd.parse(b);
		int ans = date.compareTo(hikaku);
		if (ans == 0  || ans == -1) {
			System.out.println("Heisei");
		} else {
			System.out.println("TBD");
		}
    }
} import java.text.ParseException; ParseException java.text import java.text.SimpleDateFormat; SimpleDateFormat java.text import java.time.chrono.MinguoChronology; MinguoChronology java.time.chrono import java.util.ArrayList; ArrayList java.util import java.util.Date; Date java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws ParseException {

		Scanner sc = new Scanner(System.in);
		String a = sc.nextLine();
		SimpleDateFormat sd = new SimpleDateFormat();
		sd.applyPattern("yyyy/MM/dd");
		Date date = sd.parse(a);
		String b = "2019/04/30";
		Date hikaku = sd.parse(b);
		int ans = date.compareTo(hikaku);
		if (ans == 0  || ans == -1) {
			System.out.println("Heisei");
		} else {
			System.out.println("TBD");
		}
    }
} Main public static void main(String[] args) throws ParseException {

		Scanner sc = new Scanner(System.in);
		String a = sc.nextLine();
		SimpleDateFormat sd = new SimpleDateFormat();
		sd.applyPattern("yyyy/MM/dd");
		Date date = sd.parse(a);
		String b = "2019/04/30";
		Date hikaku = sd.parse(b);
		int ans = date.compareTo(hikaku);
		if (ans == 0  || ans == -1) {
			System.out.println("Heisei");
		} else {
			System.out.println("TBD");
		}
    } main {

		Scanner sc = new Scanner(System.in);
		String a = sc.nextLine();
		SimpleDateFormat sd = new SimpleDateFormat();
		sd.applyPattern("yyyy/MM/dd");
		Date date = sd.parse(a);
		String b = "2019/04/30";
		Date hikaku = sd.parse(b);
		int ans = date.compareTo(hikaku);
		if (ans == 0  || ans == -1) {
			System.out.println("Heisei");
		} else {
			System.out.println("TBD");
		}
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.nextLine(); a sc.nextLine() sc.nextLine sc SimpleDateFormat sd = new SimpleDateFormat(); sd new SimpleDateFormat() sd.applyPattern("yyyy/MM/dd") sd.applyPattern sd "yyyy/MM/dd" Date date = sd.parse(a); date sd.parse(a) sd.parse sd a String b = "2019/04/30"; b "2019/04/30" Date hikaku = sd.parse(b); hikaku sd.parse(b) sd.parse sd b int ans = date.compareTo(hikaku); ans date.compareTo(hikaku) date.compareTo date hikaku if (ans == 0  || ans == -1) {
			System.out.println("Heisei");
		} else {
			System.out.println("TBD");
		} ans == 0  || ans == -1 ans == 0 ans 0 ans == -1 ans -1 1 {
			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) throws ParseException {

		Scanner sc = new Scanner(System.in);
		String a = sc.nextLine();
		SimpleDateFormat sd = new SimpleDateFormat();
		sd.applyPattern("yyyy/MM/dd");
		Date date = sd.parse(a);
		String b = "2019/04/30";
		Date hikaku = sd.parse(b);
		int ans = date.compareTo(hikaku);
		if (ans == 0  || ans == -1) {
			System.out.println("Heisei");
		} else {
			System.out.println("TBD");
		}
    }
} public class Main {

	public static void main(String[] args) throws ParseException {

		Scanner sc = new Scanner(System.in);
		String a = sc.nextLine();
		SimpleDateFormat sd = new SimpleDateFormat();
		sd.applyPattern("yyyy/MM/dd");
		Date date = sd.parse(a);
		String b = "2019/04/30";
		Date hikaku = sd.parse(b);
		int ans = date.compareTo(hikaku);
		if (ans == 0  || ans == -1) {
			System.out.println("Heisei");
		} else {
			System.out.println("TBD");
		}
    }
} Main
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.chrono.MinguoChronology;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws ParseException {

		Scanner sc = new Scanner(System.in);
		String a = sc.nextLine();
		SimpleDateFormat sd = new SimpleDateFormat();
		sd.applyPattern("yyyy/MM/dd");
		Date date = sd.parse(a);
		String b = "2019/04/30";
		Date hikaku = sd.parse(b);
		int ans = date.compareTo(hikaku);
		if (ans == 0  || ans == -1) {
			System.out.println("Heisei");
		} else {
			System.out.println("TBD");
		}
    }
}