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