import java.util.*;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    if (Integer.valueOf(S.substring(0, 4)) <= 2019) {
      if (Integer.valueOf(S.substring(5, 6)) != 0) {
        System.out.println("TBD");
        return;
      }
      if (Integer.valueOf(S.substring(6, 7)) < 5 && (int) Integer.valueOf(S.substring(8, 10)) < 31) {
        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();
    if (Integer.valueOf(S.substring(0, 4)) <= 2019) {
      if (Integer.valueOf(S.substring(5, 6)) != 0) {
        System.out.println("TBD");
        return;
      }
      if (Integer.valueOf(S.substring(6, 7)) < 5 && (int) Integer.valueOf(S.substring(8, 10)) < 31) {
        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();
    if (Integer.valueOf(S.substring(0, 4)) <= 2019) {
      if (Integer.valueOf(S.substring(5, 6)) != 0) {
        System.out.println("TBD");
        return;
      }
      if (Integer.valueOf(S.substring(6, 7)) < 5 && (int) Integer.valueOf(S.substring(8, 10)) < 31) {
        System.out.println("Heisei");
        return;
      }
    }
    System.out.println("TBD");
  } main {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    if (Integer.valueOf(S.substring(0, 4)) <= 2019) {
      if (Integer.valueOf(S.substring(5, 6)) != 0) {
        System.out.println("TBD");
        return;
      }
      if (Integer.valueOf(S.substring(6, 7)) < 5 && (int) Integer.valueOf(S.substring(8, 10)) < 31) {
        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 if (Integer.valueOf(S.substring(0, 4)) <= 2019) {
      if (Integer.valueOf(S.substring(5, 6)) != 0) {
        System.out.println("TBD");
        return;
      }
      if (Integer.valueOf(S.substring(6, 7)) < 5 && (int) Integer.valueOf(S.substring(8, 10)) < 31) {
        System.out.println("Heisei");
        return;
      }
    } Integer.valueOf(S.substring(0, 4)) <= 2019 Integer.valueOf(S.substring(0, 4)) Integer.valueOf Integer S.substring(0, 4) S.substring S 0 4 2019 {
      if (Integer.valueOf(S.substring(5, 6)) != 0) {
        System.out.println("TBD");
        return;
      }
      if (Integer.valueOf(S.substring(6, 7)) < 5 && (int) Integer.valueOf(S.substring(8, 10)) < 31) {
        System.out.println("Heisei");
        return;
      }
    } if (Integer.valueOf(S.substring(5, 6)) != 0) {
        System.out.println("TBD");
        return;
      } Integer.valueOf(S.substring(5, 6)) != 0 Integer.valueOf(S.substring(5, 6)) Integer.valueOf Integer S.substring(5, 6) S.substring S 5 6 0 {
        System.out.println("TBD");
        return;
      } System.out.println("TBD") System.out.println System.out System System.out "TBD" return; if (Integer.valueOf(S.substring(6, 7)) < 5 && (int) Integer.valueOf(S.substring(8, 10)) < 31) {
        System.out.println("Heisei");
        return;
      } Integer.valueOf(S.substring(6, 7)) < 5 && (int) Integer.valueOf(S.substring(8, 10)) < 31 Integer.valueOf(S.substring(6, 7)) < 5 Integer.valueOf(S.substring(6, 7)) Integer.valueOf Integer S.substring(6, 7) S.substring S 6 7 5 (int) Integer.valueOf(S.substring(8, 10)) < 31 (int) Integer.valueOf(S.substring(8, 10)) Integer.valueOf Integer S.substring(8, 10) S.substring S 8 10 31 {
        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();
    if (Integer.valueOf(S.substring(0, 4)) <= 2019) {
      if (Integer.valueOf(S.substring(5, 6)) != 0) {
        System.out.println("TBD");
        return;
      }
      if (Integer.valueOf(S.substring(6, 7)) < 5 && (int) Integer.valueOf(S.substring(8, 10)) < 31) {
        System.out.println("Heisei");
        return;
      }
    }
    System.out.println("TBD");
  }
}