import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();

            int yyyy = Integer.parseInt(S.substring(0, 4));
            int mm = Integer.parseInt(S.substring(5, 7));
            int dd = Integer.parseInt(S.substring(8, 10));

            System.out.println(isHeisei(yyyy, mm, dd) ? "Heisei" : "TBD");
        }
    }

    private static boolean isHeisei(int yyyy, int mm, int dd) {
        if (yyyy < 2019) {
            return true;
        }
        if (yyyy > 2019) {
            return false;
        }
        if (mm < 5) {
            return true;
        }
        return false;
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();

            int yyyy = Integer.parseInt(S.substring(0, 4));
            int mm = Integer.parseInt(S.substring(5, 7));
            int dd = Integer.parseInt(S.substring(8, 10));

            System.out.println(isHeisei(yyyy, mm, dd) ? "Heisei" : "TBD");
        }
    }

    private static boolean isHeisei(int yyyy, int mm, int dd) {
        if (yyyy < 2019) {
            return true;
        }
        if (yyyy > 2019) {
            return false;
        }
        if (mm < 5) {
            return true;
        }
        return false;
    }
} Main public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();

            int yyyy = Integer.parseInt(S.substring(0, 4));
            int mm = Integer.parseInt(S.substring(5, 7));
            int dd = Integer.parseInt(S.substring(8, 10));

            System.out.println(isHeisei(yyyy, mm, dd) ? "Heisei" : "TBD");
        }
    } main {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();

            int yyyy = Integer.parseInt(S.substring(0, 4));
            int mm = Integer.parseInt(S.substring(5, 7));
            int dd = Integer.parseInt(S.substring(8, 10));

            System.out.println(isHeisei(yyyy, mm, dd) ? "Heisei" : "TBD");
        }
    } try (Scanner in = new Scanner(System.in)) {
            String S = in.next();

            int yyyy = Integer.parseInt(S.substring(0, 4));
            int mm = Integer.parseInt(S.substring(5, 7));
            int dd = Integer.parseInt(S.substring(8, 10));

            System.out.println(isHeisei(yyyy, mm, dd) ? "Heisei" : "TBD");
        } {
            String S = in.next();

            int yyyy = Integer.parseInt(S.substring(0, 4));
            int mm = Integer.parseInt(S.substring(5, 7));
            int dd = Integer.parseInt(S.substring(8, 10));

            System.out.println(isHeisei(yyyy, mm, dd) ? "Heisei" : "TBD");
        } Scanner in = new Scanner(System.in) Scanner in = new Scanner(System.in) new Scanner(System.in) String S = in.next(); S in.next() in.next in int yyyy = Integer.parseInt(S.substring(0, 4)); yyyy Integer.parseInt(S.substring(0, 4)) Integer.parseInt Integer S.substring(0, 4) S.substring S 0 4 int mm = Integer.parseInt(S.substring(5, 7)); mm Integer.parseInt(S.substring(5, 7)) Integer.parseInt Integer S.substring(5, 7) S.substring S 5 7 int dd = Integer.parseInt(S.substring(8, 10)); dd Integer.parseInt(S.substring(8, 10)) Integer.parseInt Integer S.substring(8, 10) S.substring S 8 10 System.out.println(isHeisei(yyyy, mm, dd) ? "Heisei" : "TBD") System.out.println System.out System System.out isHeisei(yyyy, mm, dd) ? "Heisei" : "TBD" isHeisei(yyyy, mm, dd) isHeisei yyyy mm dd "Heisei" "TBD" String[] args args private static boolean isHeisei(int yyyy, int mm, int dd) {
        if (yyyy < 2019) {
            return true;
        }
        if (yyyy > 2019) {
            return false;
        }
        if (mm < 5) {
            return true;
        }
        return false;
    } isHeisei {
        if (yyyy < 2019) {
            return true;
        }
        if (yyyy > 2019) {
            return false;
        }
        if (mm < 5) {
            return true;
        }
        return false;
    } if (yyyy < 2019) {
            return true;
        } yyyy < 2019 yyyy 2019 {
            return true;
        } return true; true if (yyyy > 2019) {
            return false;
        } yyyy > 2019 yyyy 2019 {
            return false;
        } return false; false if (mm < 5) {
            return true;
        } mm < 5 mm 5 {
            return true;
        } return true; true return false; false int yyyy yyyy int mm mm int dd dd public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();

            int yyyy = Integer.parseInt(S.substring(0, 4));
            int mm = Integer.parseInt(S.substring(5, 7));
            int dd = Integer.parseInt(S.substring(8, 10));

            System.out.println(isHeisei(yyyy, mm, dd) ? "Heisei" : "TBD");
        }
    }

    private static boolean isHeisei(int yyyy, int mm, int dd) {
        if (yyyy < 2019) {
            return true;
        }
        if (yyyy > 2019) {
            return false;
        }
        if (mm < 5) {
            return true;
        }
        return false;
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();

            int yyyy = Integer.parseInt(S.substring(0, 4));
            int mm = Integer.parseInt(S.substring(5, 7));
            int dd = Integer.parseInt(S.substring(8, 10));

            System.out.println(isHeisei(yyyy, mm, dd) ? "Heisei" : "TBD");
        }
    }

    private static boolean isHeisei(int yyyy, int mm, int dd) {
        if (yyyy < 2019) {
            return true;
        }
        if (yyyy > 2019) {
            return false;
        }
        if (mm < 5) {
            return true;
        }
        return false;
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            String S = in.next();

            int yyyy = Integer.parseInt(S.substring(0, 4));
            int mm = Integer.parseInt(S.substring(5, 7));
            int dd = Integer.parseInt(S.substring(8, 10));

            System.out.println(isHeisei(yyyy, mm, dd) ? "Heisei" : "TBD");
        }
    }

    private static boolean isHeisei(int yyyy, int mm, int dd) {
        if (yyyy < 2019) {
            return true;
        }
        if (yyyy > 2019) {
            return false;
        }
        if (mm < 5) {
            return true;
        }
        return false;
    }
}
