import re
a=input()
b=re.fullmatch(r"(\d{4})/(\d{2})/(\d{2})",a)
if int(b.group(1))<2019:
    print("Heisei")

elif int(b.group(1))==2019:
    if int(b.group(2))<=4:
        print("Heisei")

    else:
        print("TBD")

else:
    print("TBD") import re re a=input() a input() input b=re.fullmatch(r"(\d{4})/(\d{2})/(\d{2})",a) b re.fullmatch(r"(\d{4})/(\d{2})/(\d{2})",a) re.fullmatch re fullmatch r"(\d{4})/(\d{2})/(\d{2})" a if int(b.group(1))<2019:
    print("Heisei")

elif int(b.group(1))==2019:
    if int(b.group(2))<=4:
        print("Heisei")

    else:
        print("TBD")

else:
    print("TBD") int(b.group(1))<2019 int(b.group(1)) int b.group(1) b.group b group 1 2019 print("Heisei") print "Heisei" elif int(b.group(1))==2019:
    if int(b.group(2))<=4:
        print("Heisei")

    else:
        print("TBD") int(b.group(1))==2019 int(b.group(1)) int b.group(1) b.group b group 1 2019 if int(b.group(2))<=4:
        print("Heisei")

    else:
        print("TBD") int(b.group(2))<=4 int(b.group(2)) int b.group(2) b.group b group 2 4 print("Heisei") print "Heisei" print("TBD") print "TBD" print("TBD") print "TBD" b=re.fullmatch(r"(\d{4})/(\d{2})/(\d{2})",a) re.fullmatch(r"(\d{4})/(\d{2})/(\d{2})",a) b a=input() input() a
import re
a=input()
b=re.fullmatch(r"(\d{4})/(\d{2})/(\d{2})",a)
if int(b.group(1))<2019:
    print("Heisei")

elif int(b.group(1))==2019:
    if int(b.group(2))<=4:
        print("Heisei")

    else:
        print("TBD")

else:
    print("TBD")