import java.util.*;

public class Main {

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

        String[] sArr = s.split("/");
        int yyyy = Integer.valueOf(sArr[0]);
        int mm = Integer.valueOf(sArr[1]);
        int dd = Integer.valueOf(sArr[2]);

        String ans = "Heisei";

        Date border = new Date(2019, 4, 30);
        Date targetDate = new Date(yyyy, mm, dd);

        if (targetDate.compareTo(border) > 0) ans = "TBD";

        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {

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

        String[] sArr = s.split("/");
        int yyyy = Integer.valueOf(sArr[0]);
        int mm = Integer.valueOf(sArr[1]);
        int dd = Integer.valueOf(sArr[2]);

        String ans = "Heisei";

        Date border = new Date(2019, 4, 30);
        Date targetDate = new Date(yyyy, mm, dd);

        if (targetDate.compareTo(border) > 0) ans = "TBD";

        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        String[] sArr = s.split("/");
        int yyyy = Integer.valueOf(sArr[0]);
        int mm = Integer.valueOf(sArr[1]);
        int dd = Integer.valueOf(sArr[2]);

        String ans = "Heisei";

        Date border = new Date(2019, 4, 30);
        Date targetDate = new Date(yyyy, mm, dd);

        if (targetDate.compareTo(border) > 0) ans = "TBD";

        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        String[] sArr = s.split("/");
        int yyyy = Integer.valueOf(sArr[0]);
        int mm = Integer.valueOf(sArr[1]);
        int dd = Integer.valueOf(sArr[2]);

        String ans = "Heisei";

        Date border = new Date(2019, 4, 30);
        Date targetDate = new Date(yyyy, mm, dd);

        if (targetDate.compareTo(border) > 0) ans = "TBD";

        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc String[] sArr = s.split("/"); sArr s.split("/") s.split s "/" int yyyy = Integer.valueOf(sArr[0]); yyyy Integer.valueOf(sArr[0]) Integer.valueOf Integer sArr[0] sArr 0 int mm = Integer.valueOf(sArr[1]); mm Integer.valueOf(sArr[1]) Integer.valueOf Integer sArr[1] sArr 1 int dd = Integer.valueOf(sArr[2]); dd Integer.valueOf(sArr[2]) Integer.valueOf Integer sArr[2] sArr 2 String ans = "Heisei"; ans "Heisei" Date border = new Date(2019, 4, 30); border new Date(2019, 4, 30) Date targetDate = new Date(yyyy, mm, dd); targetDate new Date(yyyy, mm, dd) if (targetDate.compareTo(border) > 0) ans = "TBD"; targetDate.compareTo(border) > 0 targetDate.compareTo(border) targetDate.compareTo targetDate border 0 ans = "TBD" ans "TBD" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

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

        String[] sArr = s.split("/");
        int yyyy = Integer.valueOf(sArr[0]);
        int mm = Integer.valueOf(sArr[1]);
        int dd = Integer.valueOf(sArr[2]);

        String ans = "Heisei";

        Date border = new Date(2019, 4, 30);
        Date targetDate = new Date(yyyy, mm, dd);

        if (targetDate.compareTo(border) > 0) ans = "TBD";

        System.out.println(ans);
    }
} public class Main {

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

        String[] sArr = s.split("/");
        int yyyy = Integer.valueOf(sArr[0]);
        int mm = Integer.valueOf(sArr[1]);
        int dd = Integer.valueOf(sArr[2]);

        String ans = "Heisei";

        Date border = new Date(2019, 4, 30);
        Date targetDate = new Date(yyyy, mm, dd);

        if (targetDate.compareTo(border) > 0) ans = "TBD";

        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main {

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

        String[] sArr = s.split("/");
        int yyyy = Integer.valueOf(sArr[0]);
        int mm = Integer.valueOf(sArr[1]);
        int dd = Integer.valueOf(sArr[2]);

        String ans = "Heisei";

        Date border = new Date(2019, 4, 30);
        Date targetDate = new Date(yyyy, mm, dd);

        if (targetDate.compareTo(border) > 0) ans = "TBD";

        System.out.println(ans);
    }
}
