import java.io.*;

public class Main {


    private static String solver(String input) {
        String[] intputArray = input.split("/");
        int year = Integer.parseInt(intputArray[0]);
        int month = Integer.parseInt(intputArray[1]);
        int day = Integer.parseInt(intputArray[2]);

        int dateNum = year * 10000 + month * 100 + day;
        if(dateNum <= 20190430){
            return "Heisei";
        }else{
            return "TBD";
        }
    }


    public static void main(String[] args) {

        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
        String input = "";
        try {
            input = br.readLine();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println(solver(input));

    }
} import java.io.*; io.* java public class Main {


    private static String solver(String input) {
        String[] intputArray = input.split("/");
        int year = Integer.parseInt(intputArray[0]);
        int month = Integer.parseInt(intputArray[1]);
        int day = Integer.parseInt(intputArray[2]);

        int dateNum = year * 10000 + month * 100 + day;
        if(dateNum <= 20190430){
            return "Heisei";
        }else{
            return "TBD";
        }
    }


    public static void main(String[] args) {

        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
        String input = "";
        try {
            input = br.readLine();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println(solver(input));

    }
} Main private static String solver(String input) {
        String[] intputArray = input.split("/");
        int year = Integer.parseInt(intputArray[0]);
        int month = Integer.parseInt(intputArray[1]);
        int day = Integer.parseInt(intputArray[2]);

        int dateNum = year * 10000 + month * 100 + day;
        if(dateNum <= 20190430){
            return "Heisei";
        }else{
            return "TBD";
        }
    } solver {
        String[] intputArray = input.split("/");
        int year = Integer.parseInt(intputArray[0]);
        int month = Integer.parseInt(intputArray[1]);
        int day = Integer.parseInt(intputArray[2]);

        int dateNum = year * 10000 + month * 100 + day;
        if(dateNum <= 20190430){
            return "Heisei";
        }else{
            return "TBD";
        }
    } String[] intputArray = input.split("/"); intputArray input.split("/") input.split input "/" int year = Integer.parseInt(intputArray[0]); year Integer.parseInt(intputArray[0]) Integer.parseInt Integer intputArray[0] intputArray 0 int month = Integer.parseInt(intputArray[1]); month Integer.parseInt(intputArray[1]) Integer.parseInt Integer intputArray[1] intputArray 1 int day = Integer.parseInt(intputArray[2]); day Integer.parseInt(intputArray[2]) Integer.parseInt Integer intputArray[2] intputArray 2 int dateNum = year * 10000 + month * 100 + day; dateNum year * 10000 + month * 100 + day year * 10000 + month * 100 + day year * 10000 year 10000 month * 100 month 100 day if(dateNum <= 20190430){
            return "Heisei";
        }else{
            return "TBD";
        } dateNum <= 20190430 dateNum 20190430 {
            return "Heisei";
        } return "Heisei"; "Heisei" {
            return "TBD";
        } return "TBD"; "TBD" String input input public static void main(String[] args) {

        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
        String input = "";
        try {
            input = br.readLine();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println(solver(input));

    } main {

        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
        String input = "";
        try {
            input = br.readLine();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println(solver(input));

    } InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader br = new BufferedReader(is); br new BufferedReader(is) String input = ""; input "" try {
            input = br.readLine();
        } catch (Exception e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        } Exception e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
            input = br.readLine();
        } input = br.readLine() input br.readLine() br.readLine br System.out.println(solver(input)) System.out.println System.out System System.out solver(input) solver input String[] args args public class Main {


    private static String solver(String input) {
        String[] intputArray = input.split("/");
        int year = Integer.parseInt(intputArray[0]);
        int month = Integer.parseInt(intputArray[1]);
        int day = Integer.parseInt(intputArray[2]);

        int dateNum = year * 10000 + month * 100 + day;
        if(dateNum <= 20190430){
            return "Heisei";
        }else{
            return "TBD";
        }
    }


    public static void main(String[] args) {

        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
        String input = "";
        try {
            input = br.readLine();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println(solver(input));

    }
} public class Main {


    private static String solver(String input) {
        String[] intputArray = input.split("/");
        int year = Integer.parseInt(intputArray[0]);
        int month = Integer.parseInt(intputArray[1]);
        int day = Integer.parseInt(intputArray[2]);

        int dateNum = year * 10000 + month * 100 + day;
        if(dateNum <= 20190430){
            return "Heisei";
        }else{
            return "TBD";
        }
    }


    public static void main(String[] args) {

        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
        String input = "";
        try {
            input = br.readLine();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println(solver(input));

    }
} Main
import java.io.*;

public class Main {


    private static String solver(String input) {
        String[] intputArray = input.split("/");
        int year = Integer.parseInt(intputArray[0]);
        int month = Integer.parseInt(intputArray[1]);
        int day = Integer.parseInt(intputArray[2]);

        int dateNum = year * 10000 + month * 100 + day;
        if(dateNum <= 20190430){
            return "Heisei";
        }else{
            return "TBD";
        }
    }


    public static void main(String[] args) {

        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
        String input = "";
        try {
            input = br.readLine();
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println(solver(input));

    }
}