import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.format.ResolverStyle;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);

        String S = scanner.next();
        scanner.close();

        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd");
        formatter.withResolverStyle(ResolverStyle.LENIENT);

        LocalDate tDate = LocalDate.parse("2019/04/30", formatter);
        LocalDate ldt = LocalDate.parse(S, formatter);

        if (ldt.isEqual(tDate) || ldt.isBefore(tDate)) {
            System.out.println("Heisei");
        } else {
            System.out.println("TBD");
        }
//        System.out.println(System.currentTimeMillis() - startTime);
    }
} import java.time.LocalDate; LocalDate java.time import java.time.format.DateTimeFormatter; DateTimeFormatter java.time.format import java.time.format.ResolverStyle; ResolverStyle java.time.format import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);

        String S = scanner.next();
        scanner.close();

        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd");
        formatter.withResolverStyle(ResolverStyle.LENIENT);

        LocalDate tDate = LocalDate.parse("2019/04/30", formatter);
        LocalDate ldt = LocalDate.parse(S, formatter);

        if (ldt.isEqual(tDate) || ldt.isBefore(tDate)) {
            System.out.println("Heisei");
        } else {
            System.out.println("TBD");
        }
//        System.out.println(System.currentTimeMillis() - startTime);
    }
} Main public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);

        String S = scanner.next();
        scanner.close();

        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd");
        formatter.withResolverStyle(ResolverStyle.LENIENT);

        LocalDate tDate = LocalDate.parse("2019/04/30", formatter);
        LocalDate ldt = LocalDate.parse(S, formatter);

        if (ldt.isEqual(tDate) || ldt.isBefore(tDate)) {
            System.out.println("Heisei");
        } else {
            System.out.println("TBD");
        }
//        System.out.println(System.currentTimeMillis() - startTime);
    } main {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);

        String S = scanner.next();
        scanner.close();

        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd");
        formatter.withResolverStyle(ResolverStyle.LENIENT);

        LocalDate tDate = LocalDate.parse("2019/04/30", formatter);
        LocalDate ldt = LocalDate.parse(S, formatter);

        if (ldt.isEqual(tDate) || ldt.isBefore(tDate)) {
            System.out.println("Heisei");
        } else {
            System.out.println("TBD");
        }
//        System.out.println(System.currentTimeMillis() - startTime);
    } 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 DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd"); formatter DateTimeFormatter.ofPattern("yyyy/MM/dd") DateTimeFormatter.ofPattern DateTimeFormatter "yyyy/MM/dd" formatter.withResolverStyle(ResolverStyle.LENIENT) formatter.withResolverStyle formatter ResolverStyle.LENIENT ResolverStyle ResolverStyle.LENIENT LocalDate tDate = LocalDate.parse("2019/04/30", formatter); tDate LocalDate.parse("2019/04/30", formatter) LocalDate.parse LocalDate "2019/04/30" formatter LocalDate ldt = LocalDate.parse(S, formatter); ldt LocalDate.parse(S, formatter) LocalDate.parse LocalDate S formatter if (ldt.isEqual(tDate) || ldt.isBefore(tDate)) {
            System.out.println("Heisei");
        } else {
            System.out.println("TBD");
        } ldt.isEqual(tDate) || ldt.isBefore(tDate) ldt.isEqual(tDate) ldt.isEqual ldt tDate ldt.isBefore(tDate) ldt.isBefore ldt tDate {
            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) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);

        String S = scanner.next();
        scanner.close();

        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd");
        formatter.withResolverStyle(ResolverStyle.LENIENT);

        LocalDate tDate = LocalDate.parse("2019/04/30", formatter);
        LocalDate ldt = LocalDate.parse(S, formatter);

        if (ldt.isEqual(tDate) || ldt.isBefore(tDate)) {
            System.out.println("Heisei");
        } else {
            System.out.println("TBD");
        }
//        System.out.println(System.currentTimeMillis() - startTime);
    }
} public class Main {

    public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);

        String S = scanner.next();
        scanner.close();

        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd");
        formatter.withResolverStyle(ResolverStyle.LENIENT);

        LocalDate tDate = LocalDate.parse("2019/04/30", formatter);
        LocalDate ldt = LocalDate.parse(S, formatter);

        if (ldt.isEqual(tDate) || ldt.isBefore(tDate)) {
            System.out.println("Heisei");
        } else {
            System.out.println("TBD");
        }
//        System.out.println(System.currentTimeMillis() - startTime);
    }
} Main
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.format.ResolverStyle;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);

        String S = scanner.next();
        scanner.close();

        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd");
        formatter.withResolverStyle(ResolverStyle.LENIENT);

        LocalDate tDate = LocalDate.parse("2019/04/30", formatter);
        LocalDate ldt = LocalDate.parse(S, formatter);

        if (ldt.isEqual(tDate) || ldt.isBefore(tDate)) {
            System.out.println("Heisei");
        } else {
            System.out.println("TBD");
        }
//        System.out.println(System.currentTimeMillis() - startTime);
    }
}