import java.util.*;

class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int y = Integer.valueOf(s.substring(0,4));
    int m = Integer.valueOf(s.substring(5,7));
    int d = Integer.valueOf(s.substring(8));
    if(y<=2019){
      if(m<=4){
        if(d<=30){
          System.out.println("Heisei");
          return;
        }
      }
    }
    System.out.println("TBD");
  }
} import java.util.*; util.* java class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int y = Integer.valueOf(s.substring(0,4));
    int m = Integer.valueOf(s.substring(5,7));
    int d = Integer.valueOf(s.substring(8));
    if(y<=2019){
      if(m<=4){
        if(d<=30){
          System.out.println("Heisei");
          return;
        }
      }
    }
    System.out.println("TBD");
  }
} Main public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int y = Integer.valueOf(s.substring(0,4));
    int m = Integer.valueOf(s.substring(5,7));
    int d = Integer.valueOf(s.substring(8));
    if(y<=2019){
      if(m<=4){
        if(d<=30){
          System.out.println("Heisei");
          return;
        }
      }
    }
    System.out.println("TBD");
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int y = Integer.valueOf(s.substring(0,4));
    int m = Integer.valueOf(s.substring(5,7));
    int d = Integer.valueOf(s.substring(8));
    if(y<=2019){
      if(m<=4){
        if(d<=30){
          System.out.println("Heisei");
          return;
        }
      }
    }
    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 int y = Integer.valueOf(s.substring(0,4)); y Integer.valueOf(s.substring(0,4)) Integer.valueOf Integer s.substring(0,4) s.substring s 0 4 int m = Integer.valueOf(s.substring(5,7)); m Integer.valueOf(s.substring(5,7)) Integer.valueOf Integer s.substring(5,7) s.substring s 5 7 int d = Integer.valueOf(s.substring(8)); d Integer.valueOf(s.substring(8)) Integer.valueOf Integer s.substring(8) s.substring s 8 if(y<=2019){
      if(m<=4){
        if(d<=30){
          System.out.println("Heisei");
          return;
        }
      }
    } y<=2019 y 2019 {
      if(m<=4){
        if(d<=30){
          System.out.println("Heisei");
          return;
        }
      }
    } if(m<=4){
        if(d<=30){
          System.out.println("Heisei");
          return;
        }
      } m<=4 m 4 {
        if(d<=30){
          System.out.println("Heisei");
          return;
        }
      } if(d<=30){
          System.out.println("Heisei");
          return;
        } d<=30 d 30 {
          System.out.println("Heisei");
          return;
        } System.out.println("Heisei") System.out.println System.out System System.out "Heisei" return; System.out.println("TBD") System.out.println System.out System System.out "TBD" String args[] args
import java.util.*;

class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int y = Integer.valueOf(s.substring(0,4));
    int m = Integer.valueOf(s.substring(5,7));
    int d = Integer.valueOf(s.substring(8));
    if(y<=2019){
      if(m<=4){
        if(d<=30){
          System.out.println("Heisei");
          return;
        }
      }
    }
    System.out.println("TBD");
  }
}