import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        Scanner stdIn = new Scanner(System.in);
        
        //int a = stdIn.nextInt();
        //int b = stdIn.nextInt();
        //int c = stdIn.nextInt();
        //int w = stdIn.nextInt();
        //int n = stdIn.nextInt();
        //int k = stdIn.nextInt();
        String s = stdIn.next();
        char c[] = s.toCharArray();
        boolean heisei = true;
        
        if(c[5] == '1'){
            heisei = false;
        }else if(c[6] == '5' ||c[6] == '6' ||c[6] == '7' ||c[6] == '8' ||c[6] == '9'){
            heisei = false;
        }
        
        if(heisei){
            System.out.println("Heisei");
        }else{
            System.out.println("TBD");
        }
        
        //System.out.println();
        //System.out.print();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]){
        Scanner stdIn = new Scanner(System.in);
        
        //int a = stdIn.nextInt();
        //int b = stdIn.nextInt();
        //int c = stdIn.nextInt();
        //int w = stdIn.nextInt();
        //int n = stdIn.nextInt();
        //int k = stdIn.nextInt();
        String s = stdIn.next();
        char c[] = s.toCharArray();
        boolean heisei = true;
        
        if(c[5] == '1'){
            heisei = false;
        }else if(c[6] == '5' ||c[6] == '6' ||c[6] == '7' ||c[6] == '8' ||c[6] == '9'){
            heisei = false;
        }
        
        if(heisei){
            System.out.println("Heisei");
        }else{
            System.out.println("TBD");
        }
        
        //System.out.println();
        //System.out.print();
    }
} Main public static void main(String args[]){
        Scanner stdIn = new Scanner(System.in);
        
        //int a = stdIn.nextInt();
        //int b = stdIn.nextInt();
        //int c = stdIn.nextInt();
        //int w = stdIn.nextInt();
        //int n = stdIn.nextInt();
        //int k = stdIn.nextInt();
        String s = stdIn.next();
        char c[] = s.toCharArray();
        boolean heisei = true;
        
        if(c[5] == '1'){
            heisei = false;
        }else if(c[6] == '5' ||c[6] == '6' ||c[6] == '7' ||c[6] == '8' ||c[6] == '9'){
            heisei = false;
        }
        
        if(heisei){
            System.out.println("Heisei");
        }else{
            System.out.println("TBD");
        }
        
        //System.out.println();
        //System.out.print();
    } main {
        Scanner stdIn = new Scanner(System.in);
        
        //int a = stdIn.nextInt();
        //int b = stdIn.nextInt();
        //int c = stdIn.nextInt();
        //int w = stdIn.nextInt();
        //int n = stdIn.nextInt();
        //int k = stdIn.nextInt();
        String s = stdIn.next();
        char c[] = s.toCharArray();
        boolean heisei = true;
        
        if(c[5] == '1'){
            heisei = false;
        }else if(c[6] == '5' ||c[6] == '6' ||c[6] == '7' ||c[6] == '8' ||c[6] == '9'){
            heisei = false;
        }
        
        if(heisei){
            System.out.println("Heisei");
        }else{
            System.out.println("TBD");
        }
        
        //System.out.println();
        //System.out.print();
    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) String s = stdIn.next(); s stdIn.next() stdIn.next stdIn char c[] = s.toCharArray(); c s.toCharArray() s.toCharArray s boolean heisei = true; heisei true if(c[5] == '1'){
            heisei = false;
        }else if(c[6] == '5' ||c[6] == '6' ||c[6] == '7' ||c[6] == '8' ||c[6] == '9'){
            heisei = false;
        } c[5] == '1' c[5] c 5 '1' {
            heisei = false;
        } heisei = false heisei false if(c[6] == '5' ||c[6] == '6' ||c[6] == '7' ||c[6] == '8' ||c[6] == '9'){
            heisei = false;
        } c[6] == '5' ||c[6] == '6' ||c[6] == '7' ||c[6] == '8' ||c[6] == '9' c[6] == '8' c[6] == '7' c[6] == '5' ||c[6] == '6' ||c[6] == '7' ||c[6] == '8' ||c[6] == '9' c[6] == '5' c[6] c 6 '5' c[6] == '6' c[6] c 6 '6' c[6] == '7' c[6] c 6 '7' c[6] == '8' c[6] c 6 '8' c[6] == '9' c[6] c 6 '9' {
            heisei = false;
        } heisei = false heisei false if(heisei){
            System.out.println("Heisei");
        }else{
            System.out.println("TBD");
        } heisei {
            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 stdIn = new Scanner(System.in);
        
        //int a = stdIn.nextInt();
        //int b = stdIn.nextInt();
        //int c = stdIn.nextInt();
        //int w = stdIn.nextInt();
        //int n = stdIn.nextInt();
        //int k = stdIn.nextInt();
        String s = stdIn.next();
        char c[] = s.toCharArray();
        boolean heisei = true;
        
        if(c[5] == '1'){
            heisei = false;
        }else if(c[6] == '5' ||c[6] == '6' ||c[6] == '7' ||c[6] == '8' ||c[6] == '9'){
            heisei = false;
        }
        
        if(heisei){
            System.out.println("Heisei");
        }else{
            System.out.println("TBD");
        }
        
        //System.out.println();
        //System.out.print();
    }
} public class Main {
    public static void main(String args[]){
        Scanner stdIn = new Scanner(System.in);
        
        //int a = stdIn.nextInt();
        //int b = stdIn.nextInt();
        //int c = stdIn.nextInt();
        //int w = stdIn.nextInt();
        //int n = stdIn.nextInt();
        //int k = stdIn.nextInt();
        String s = stdIn.next();
        char c[] = s.toCharArray();
        boolean heisei = true;
        
        if(c[5] == '1'){
            heisei = false;
        }else if(c[6] == '5' ||c[6] == '6' ||c[6] == '7' ||c[6] == '8' ||c[6] == '9'){
            heisei = false;
        }
        
        if(heisei){
            System.out.println("Heisei");
        }else{
            System.out.println("TBD");
        }
        
        //System.out.println();
        //System.out.print();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        Scanner stdIn = new Scanner(System.in);
        
        //int a = stdIn.nextInt();
        //int b = stdIn.nextInt();
        //int c = stdIn.nextInt();
        //int w = stdIn.nextInt();
        //int n = stdIn.nextInt();
        //int k = stdIn.nextInt();
        String s = stdIn.next();
        char c[] = s.toCharArray();
        boolean heisei = true;
        
        if(c[5] == '1'){
            heisei = false;
        }else if(c[6] == '5' ||c[6] == '6' ||c[6] == '7' ||c[6] == '8' ||c[6] == '9'){
            heisei = false;
        }
        
        if(heisei){
            System.out.println("Heisei");
        }else{
            System.out.println("TBD");
        }
        
        //System.out.println();
        //System.out.print();
    }
}
