import java.util.*;

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

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