

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws ParseException {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();



//        if (date.equals(LocalDate.of(2019, 4, 30))) {
//            System.out.println("Heisei");
//        } else if (date.isBefore(LocalDate.of(2019, 4, 30))) {
//            System.out.println("Heisei");
//        } else {
//            System.out.println("TBD");
//        }

        int y = Integer.parseInt(s.substring(0, 4));
        int m = Integer.parseInt(s.substring(5, 7));
        int d = Integer.parseInt(s.substring(8, 10));

        if (y == 2019 && m == 4 && d == 30) {
            System.out.println("Heisei");
            return;
        }

        if (y > 2019) {
            System.out.println("TBD");
            return;
        }
        if (y == 2019 && m > 4) {
            System.out.println("TBD");
            return;
        }
        System.out.println("Heisei");

    }
} import java.text.ParseException; ParseException java.text import java.text.SimpleDateFormat; SimpleDateFormat java.text import java.time.LocalDate; LocalDate java.time import java.time.format.DateTimeFormatter; DateTimeFormatter java.time.format 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 {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();



//        if (date.equals(LocalDate.of(2019, 4, 30))) {
//            System.out.println("Heisei");
//        } else if (date.isBefore(LocalDate.of(2019, 4, 30))) {
//            System.out.println("Heisei");
//        } else {
//            System.out.println("TBD");
//        }

        int y = Integer.parseInt(s.substring(0, 4));
        int m = Integer.parseInt(s.substring(5, 7));
        int d = Integer.parseInt(s.substring(8, 10));

        if (y == 2019 && m == 4 && d == 30) {
            System.out.println("Heisei");
            return;
        }

        if (y > 2019) {
            System.out.println("TBD");
            return;
        }
        if (y == 2019 && m > 4) {
            System.out.println("TBD");
            return;
        }
        System.out.println("Heisei");

    }
} Main public static void main(String[] args) throws ParseException {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();



//        if (date.equals(LocalDate.of(2019, 4, 30))) {
//            System.out.println("Heisei");
//        } else if (date.isBefore(LocalDate.of(2019, 4, 30))) {
//            System.out.println("Heisei");
//        } else {
//            System.out.println("TBD");
//        }

        int y = Integer.parseInt(s.substring(0, 4));
        int m = Integer.parseInt(s.substring(5, 7));
        int d = Integer.parseInt(s.substring(8, 10));

        if (y == 2019 && m == 4 && d == 30) {
            System.out.println("Heisei");
            return;
        }

        if (y > 2019) {
            System.out.println("TBD");
            return;
        }
        if (y == 2019 && m > 4) {
            System.out.println("TBD");
            return;
        }
        System.out.println("Heisei");

    } main {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();



//        if (date.equals(LocalDate.of(2019, 4, 30))) {
//            System.out.println("Heisei");
//        } else if (date.isBefore(LocalDate.of(2019, 4, 30))) {
//            System.out.println("Heisei");
//        } else {
//            System.out.println("TBD");
//        }

        int y = Integer.parseInt(s.substring(0, 4));
        int m = Integer.parseInt(s.substring(5, 7));
        int d = Integer.parseInt(s.substring(8, 10));

        if (y == 2019 && m == 4 && d == 30) {
            System.out.println("Heisei");
            return;
        }

        if (y > 2019) {
            System.out.println("TBD");
            return;
        }
        if (y == 2019 && m > 4) {
            System.out.println("TBD");
            return;
        }
        System.out.println("Heisei");

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int y = Integer.parseInt(s.substring(0, 4)); y Integer.parseInt(s.substring(0, 4)) Integer.parseInt Integer s.substring(0, 4) s.substring s 0 4 int m = Integer.parseInt(s.substring(5, 7)); m Integer.parseInt(s.substring(5, 7)) Integer.parseInt Integer s.substring(5, 7) s.substring s 5 7 int d = Integer.parseInt(s.substring(8, 10)); d Integer.parseInt(s.substring(8, 10)) Integer.parseInt Integer s.substring(8, 10) s.substring s 8 10 if (y == 2019 && m == 4 && d == 30) {
            System.out.println("Heisei");
            return;
        } y == 2019 && m == 4 && d == 30 y == 2019 && m == 4 && d == 30 y == 2019 y 2019 m == 4 m 4 d == 30 d 30 {
            System.out.println("Heisei");
            return;
        } System.out.println("Heisei") System.out.println System.out System System.out "Heisei" return; if (y > 2019) {
            System.out.println("TBD");
            return;
        } y > 2019 y 2019 {
            System.out.println("TBD");
            return;
        } System.out.println("TBD") System.out.println System.out System System.out "TBD" return; if (y == 2019 && m > 4) {
            System.out.println("TBD");
            return;
        } y == 2019 && m > 4 y == 2019 y 2019 m > 4 m 4 {
            System.out.println("TBD");
            return;
        } System.out.println("TBD") System.out.println System.out System System.out "TBD" return; System.out.println("Heisei") System.out.println System.out System System.out "Heisei" String[] args args public class Main {

    public static void main(String[] args) throws ParseException {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();



//        if (date.equals(LocalDate.of(2019, 4, 30))) {
//            System.out.println("Heisei");
//        } else if (date.isBefore(LocalDate.of(2019, 4, 30))) {
//            System.out.println("Heisei");
//        } else {
//            System.out.println("TBD");
//        }

        int y = Integer.parseInt(s.substring(0, 4));
        int m = Integer.parseInt(s.substring(5, 7));
        int d = Integer.parseInt(s.substring(8, 10));

        if (y == 2019 && m == 4 && d == 30) {
            System.out.println("Heisei");
            return;
        }

        if (y > 2019) {
            System.out.println("TBD");
            return;
        }
        if (y == 2019 && m > 4) {
            System.out.println("TBD");
            return;
        }
        System.out.println("Heisei");

    }
} public class Main {

    public static void main(String[] args) throws ParseException {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();



//        if (date.equals(LocalDate.of(2019, 4, 30))) {
//            System.out.println("Heisei");
//        } else if (date.isBefore(LocalDate.of(2019, 4, 30))) {
//            System.out.println("Heisei");
//        } else {
//            System.out.println("TBD");
//        }

        int y = Integer.parseInt(s.substring(0, 4));
        int m = Integer.parseInt(s.substring(5, 7));
        int d = Integer.parseInt(s.substring(8, 10));

        if (y == 2019 && m == 4 && d == 30) {
            System.out.println("Heisei");
            return;
        }

        if (y > 2019) {
            System.out.println("TBD");
            return;
        }
        if (y == 2019 && m > 4) {
            System.out.println("TBD");
            return;
        }
        System.out.println("Heisei");

    }
} Main


import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws ParseException {
        Scanner sc = new Scanner(System.in);

        String s = sc.next();



//        if (date.equals(LocalDate.of(2019, 4, 30))) {
//            System.out.println("Heisei");
//        } else if (date.isBefore(LocalDate.of(2019, 4, 30))) {
//            System.out.println("Heisei");
//        } else {
//            System.out.println("TBD");
//        }

        int y = Integer.parseInt(s.substring(0, 4));
        int m = Integer.parseInt(s.substring(5, 7));
        int d = Integer.parseInt(s.substring(8, 10));

        if (y == 2019 && m == 4 && d == 30) {
            System.out.println("Heisei");
            return;
        }

        if (y > 2019) {
            System.out.println("TBD");
            return;
        }
        if (y == 2019 && m > 4) {
            System.out.println("TBD");
            return;
        }
        System.out.println("Heisei");

    }
}
