import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        int n = 0;
        for(int i = 0 ; i < 4 ; i++ ){
            n += (Math.pow(10 , i) * (s.charAt(3 - i) - 48));
        }
        n *= 10000;
        n += (s.charAt(5) - 48) * 1000;
        n += (s.charAt(6) - 48) * 100;
        n += (s.charAt(8) - 48) * 10;
        n += s.charAt(9) - 48;
        if(n < 20190431){
            System.out.println("Heisei");
        }else{
            System.out.println("TBD");
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        int n = 0;
        for(int i = 0 ; i < 4 ; i++ ){
            n += (Math.pow(10 , i) * (s.charAt(3 - i) - 48));
        }
        n *= 10000;
        n += (s.charAt(5) - 48) * 1000;
        n += (s.charAt(6) - 48) * 100;
        n += (s.charAt(8) - 48) * 10;
        n += s.charAt(9) - 48;
        if(n < 20190431){
            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();
        sc.close();
        int n = 0;
        for(int i = 0 ; i < 4 ; i++ ){
            n += (Math.pow(10 , i) * (s.charAt(3 - i) - 48));
        }
        n *= 10000;
        n += (s.charAt(5) - 48) * 1000;
        n += (s.charAt(6) - 48) * 100;
        n += (s.charAt(8) - 48) * 10;
        n += s.charAt(9) - 48;
        if(n < 20190431){
            System.out.println("Heisei");
        }else{
            System.out.println("TBD");
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        int n = 0;
        for(int i = 0 ; i < 4 ; i++ ){
            n += (Math.pow(10 , i) * (s.charAt(3 - i) - 48));
        }
        n *= 10000;
        n += (s.charAt(5) - 48) * 1000;
        n += (s.charAt(6) - 48) * 100;
        n += (s.charAt(8) - 48) * 10;
        n += s.charAt(9) - 48;
        if(n < 20190431){
            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 sc.close() sc.close sc int n = 0; n 0 for(int i = 0 ; i < 4 ; i++ ){
            n += (Math.pow(10 , i) * (s.charAt(3 - i) - 48));
        } int i = 0 ; int i = 0 ; i 0 i < 4 i 4 i++ i++ i {
            n += (Math.pow(10 , i) * (s.charAt(3 - i) - 48));
        } {
            n += (Math.pow(10 , i) * (s.charAt(3 - i) - 48));
        } n += (Math.pow(10 , i) * (s.charAt(3 - i) - 48)) n (Math.pow(10 , i) * (s.charAt(3 - i) - 48)) Math.pow(10 , i) Math.pow Math 10 i (s.charAt(3 - i) - 48) s.charAt(3 - i) s.charAt s 3 - i 3 i 48 n *= 10000 n 10000 n += (s.charAt(5) - 48) * 1000 n (s.charAt(5) - 48) * 1000 (s.charAt(5) - 48) s.charAt(5) s.charAt s 5 48 1000 n += (s.charAt(6) - 48) * 100 n (s.charAt(6) - 48) * 100 (s.charAt(6) - 48) s.charAt(6) s.charAt s 6 48 100 n += (s.charAt(8) - 48) * 10 n (s.charAt(8) - 48) * 10 (s.charAt(8) - 48) s.charAt(8) s.charAt s 8 48 10 n += s.charAt(9) - 48 n s.charAt(9) - 48 s.charAt(9) s.charAt s 9 48 if(n < 20190431){
            System.out.println("Heisei");
        }else{
            System.out.println("TBD");
        } n < 20190431 n 20190431 {
            System.out.println("Heisei");
        } System.out.println("Heisei") System.out.println System.out System System.out "Heisei" {
            System.out.println("TBD");
        } 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();
        sc.close();
        int n = 0;
        for(int i = 0 ; i < 4 ; i++ ){
            n += (Math.pow(10 , i) * (s.charAt(3 - i) - 48));
        }
        n *= 10000;
        n += (s.charAt(5) - 48) * 1000;
        n += (s.charAt(6) - 48) * 100;
        n += (s.charAt(8) - 48) * 10;
        n += s.charAt(9) - 48;
        if(n < 20190431){
            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();
        sc.close();
        int n = 0;
        for(int i = 0 ; i < 4 ; i++ ){
            n += (Math.pow(10 , i) * (s.charAt(3 - i) - 48));
        }
        n *= 10000;
        n += (s.charAt(5) - 48) * 1000;
        n += (s.charAt(6) - 48) * 100;
        n += (s.charAt(8) - 48) * 10;
        n += s.charAt(9) - 48;
        if(n < 20190431){
            System.out.println("Heisei");
        }else{
            System.out.println("TBD");
        }
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();
        int n = 0;
        for(int i = 0 ; i < 4 ; i++ ){
            n += (Math.pow(10 , i) * (s.charAt(3 - i) - 48));
        }
        n *= 10000;
        n += (s.charAt(5) - 48) * 1000;
        n += (s.charAt(6) - 48) * 100;
        n += (s.charAt(8) - 48) * 10;
        n += s.charAt(9) - 48;
        if(n < 20190431){
            System.out.println("Heisei");
        }else{
            System.out.println("TBD");
        }
    }
}