import java.time.LocalDate;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        int Y = Integer.valueOf(S.substring(0, 4));
        int M = Integer.valueOf(S.substring(5, 7));
        int D = Integer.valueOf(S.substring(8, 10));

        LocalDate P = LocalDate.of(Y, M, D);
        LocalDate mileStone = LocalDate.of(2019, 4, 30);

        if (P.compareTo(mileStone) <= 0)
            System.out.println("Heisei");
        else
            System.out.println("TBD");
    }
}


 import java.time.LocalDate; LocalDate java.time import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        int Y = Integer.valueOf(S.substring(0, 4));
        int M = Integer.valueOf(S.substring(5, 7));
        int D = Integer.valueOf(S.substring(8, 10));

        LocalDate P = LocalDate.of(Y, M, D);
        LocalDate mileStone = LocalDate.of(2019, 4, 30);

        if (P.compareTo(mileStone) <= 0)
            System.out.println("Heisei");
        else
            System.out.println("TBD");
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        int Y = Integer.valueOf(S.substring(0, 4));
        int M = Integer.valueOf(S.substring(5, 7));
        int D = Integer.valueOf(S.substring(8, 10));

        LocalDate P = LocalDate.of(Y, M, D);
        LocalDate mileStone = LocalDate.of(2019, 4, 30);

        if (P.compareTo(mileStone) <= 0)
            System.out.println("Heisei");
        else
            System.out.println("TBD");
    } main {

        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        int Y = Integer.valueOf(S.substring(0, 4));
        int M = Integer.valueOf(S.substring(5, 7));
        int D = Integer.valueOf(S.substring(8, 10));

        LocalDate P = LocalDate.of(Y, M, D);
        LocalDate mileStone = LocalDate.of(2019, 4, 30);

        if (P.compareTo(mileStone) <= 0)
            System.out.println("Heisei");
        else
            System.out.println("TBD");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int Y = Integer.valueOf(S.substring(0, 4)); Y Integer.valueOf(S.substring(0, 4)) Integer.valueOf Integer S.substring(0, 4) S.substring S 0 4 int M = Integer.valueOf(S.substring(5, 7)); M Integer.valueOf(S.substring(5, 7)) Integer.valueOf Integer S.substring(5, 7) S.substring S 5 7 int D = Integer.valueOf(S.substring(8, 10)); D Integer.valueOf(S.substring(8, 10)) Integer.valueOf Integer S.substring(8, 10) S.substring S 8 10 LocalDate P = LocalDate.of(Y, M, D); P LocalDate.of(Y, M, D) LocalDate.of LocalDate Y M D LocalDate mileStone = LocalDate.of(2019, 4, 30); mileStone LocalDate.of(2019, 4, 30) LocalDate.of LocalDate 2019 4 30 if (P.compareTo(mileStone) <= 0)
            System.out.println("Heisei");
        else
            System.out.println("TBD"); P.compareTo(mileStone) <= 0 P.compareTo(mileStone) P.compareTo P mileStone 0 System.out.println("Heisei") System.out.println System.out System System.out "Heisei" 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) {

        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        int Y = Integer.valueOf(S.substring(0, 4));
        int M = Integer.valueOf(S.substring(5, 7));
        int D = Integer.valueOf(S.substring(8, 10));

        LocalDate P = LocalDate.of(Y, M, D);
        LocalDate mileStone = LocalDate.of(2019, 4, 30);

        if (P.compareTo(mileStone) <= 0)
            System.out.println("Heisei");
        else
            System.out.println("TBD");
    }
} public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        int Y = Integer.valueOf(S.substring(0, 4));
        int M = Integer.valueOf(S.substring(5, 7));
        int D = Integer.valueOf(S.substring(8, 10));

        LocalDate P = LocalDate.of(Y, M, D);
        LocalDate mileStone = LocalDate.of(2019, 4, 30);

        if (P.compareTo(mileStone) <= 0)
            System.out.println("Heisei");
        else
            System.out.println("TBD");
    }
} Main
import java.time.LocalDate;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        String S = sc.next();

        int Y = Integer.valueOf(S.substring(0, 4));
        int M = Integer.valueOf(S.substring(5, 7));
        int D = Integer.valueOf(S.substring(8, 10));

        LocalDate P = LocalDate.of(Y, M, D);
        LocalDate mileStone = LocalDate.of(2019, 4, 30);

        if (P.compareTo(mileStone) <= 0)
            System.out.println("Heisei");
        else
            System.out.println("TBD");
    }
}



