y, m, d = map(int, input().split("/"))
print("TBD" if m >= 5 else "Heisei") y, m, d = map(int, input().split("/")) y map(int, input().split("/")) map int input().split("/") ().split () input split "/" m d print("TBD" if m >= 5 else "Heisei") print "TBD" if m >= 5 else "Heisei" m >= 5 m 5 "TBD" "Heisei" d = map(int, input().split("/")) map(int, input().split("/")) d m, d = map(int, input().split("/")) map(int, input().split("/")) m y, m, d = map(int, input().split("/")) map(int, input().split("/")) y
y, m, d = map(int, input().split("/"))
print("TBD" if m >= 5 else "Heisei")