Problem:
 Score : 100 points    Problem Statement You are given a string S as input. This represents a valid date in the year 2019 in the yyyy/mm/dd format. (For example, April 30 , 2019 is represented as 2019/04/30 .)  Write a program that prints Heisei if the date represented by S is not later than April 30 , 2019 , and prints TBD otherwise.      Constraints  S is a string that represents a valid date in the year 2019 in the yyyy/mm/dd format.         Input Input is given from Standard Input in the following format:  S       Output Print Heisei if the date represented by S is not later than April 30 , 2019 , and print TBD otherwise.        Sample Input 1 2019/04/30      Sample Output 1 Heisei       Sample Input 2 2019/11/01      Sample Output 2 TBD

Solution (Python):
y, m, d = map(int, input().split('/'))

if y > 2019:
    print('TBD')
elif y == 2019:
    if m > 4:
        print('TBD')
    elif m == 4:
        if d > 30:
            print('TBD')
        else:
            print('Heisei')
    else:
        print('Heisei')
else:
    print('Heisei')

Solution (Python):
S = input()
y,m,d = list(map(int,S.split("/")))

flag = False
if y < 2019:
    flag = True
elif y == 2019:
    if m <= 4:
        flag = True

if flag:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
s=list(map(int,input().split('/')))
if s[0]>=2019 and s[1]>=5 and s[2]>=1:print('TBD')
else:print('Heisei')

Solution (Python):
from datetime import datetime as dt

S = str(input())

format = '%Y/%m/%d'
d = dt.strptime(S, format)
if d <= dt.strptime('2019/4/30', format):
    print('Heisei')
else:
    print('TBD')

Solution (Python):
s = list(map(int, input().split('/')))
if s[0] == 2019:
    if s[1] <= 4:
        print('Heisei')
    else:
        print('TBD')
elif s[0] < 2019:
    print('Heisei')
else:
    print('TBD1')

Solution (Python):

import sys


def solve(S: str):
    s = int(S[:4] + S[5:7] + S[8:10])
    if s <= 20190430:
        ret = 'Heisei'
    else:
        ret = 'TBD'
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

Solution (Python):
s=str(input())
a=s.split("/")
b=int("".join(a))

if b <= 20190430:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
from datetime import datetime
a, b, c = [int(x) for x in input().rstrip().split("/")]
if datetime(a, b, c) <= datetime(2019, 4, 30):
    print("Heisei")
else:
    print("TBD")

Solution (Python):


s = raw_input().split('/')

if int(s[0]) < 2019: print 'Heisei'
elif int(s[0]) == 2019 and int(s[1]+s[2]) <=430: print 'Heisei'
else: print 'TBD'

Solution (Python):
S = input()
y = S[0:4]
m = S[5:7]
d = S[8:10]
if(int(y) >= 2019):
    if(int(m) > 4):
       print("TBD")
    else:
        print("Heisei")
else:
    print("Heisei")

Solution (Python):
S = list(map(int,input().split("/")))
if S[0]>2019:
  print("TBD")
elif S[0]<2019:
  print("Heisei")
else:
  if S[1]>4:
    print("TBD")
  elif S[1]<4:
    print("Heisei")
  else:
    if S[2]<=30:
      print("Heisei")
    else:
      print("TBD")

Solution (Python):


date = input().split("/")

if int(date[1]) <= 4:
    print("Heisei")

else:
    print("TBD")

Solution (Python):
s = str(input())
t = "2019/04/30"
l = [s,t]
l.sort()

if l[0] == s:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
def main():
    S = input().split('/')

    if int(S[0]) < 2019:
        print('Heisei')
        return
    elif int(S[0]) == 2019:
        if int(S[1]) <= 4:
            print('Heisei')
            return
        else:
            print('TBD')
            return
    else:
        print('TBD')
        return


if __name__ == '__main__':
    main()

Solution (Python):

S = input().split('/')
for i in range(3):
    S[i] = int(S[i])
if S[0] == 2019:
    if S[1] >= 5:
        print('TBD')
    else:
        print('Heisei')
elif S[0] > 2019:
    print('TDB')
else:
    print('Heisei')

Solution (Python):
S=input()

if int(S[0:4])<2019:
  print('Heisei')
elif int(S[0:4])==2019 and int(S[5:7])<=4:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
s  = int(input().replace('/', '0'))

if s <= 2019004030:
    print('Heisei')
else:
    print('TBD')

Solution (Python):



y,m,d=input().split("/")
y=int(y)
m=int(m)
d=int(d)

if(y<2019 or (y==2019 and m<5)):
	print("Heisei")
else:
	print("TBD")

Solution (Python):
S = input()
if int(S[:4]) <= 2018:
  print('Heisei')
elif int(S[:4]) == 2019 and int(S[5:7]) <= 4:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
from sys import stdin

yyyy, mm, dd = list(map(int, stdin.readline().rstrip().split("/")))

isHeisei = False

if yyyy <= 2019:
    if mm <= 4:
        if dd <= 30:
            isHeisei = True

if isHeisei:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
from datetime import datetime

tmp = input()
target = datetime(int(tmp[:4]), int(tmp[5:7]), int(tmp[8:10]), 0, 0) 
from_dt = datetime(2019, 4, 30)

if from_dt >= target:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
l=input()
if int(l[5])==1:
  print("TBD")
elif int(l[6])>4:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
y, m, d = list(map(int, input().split('/')))
if y == 2019:
  if m <= 4:
    print('Heisei')
  else:
    print('TBD')
elif y < 2019:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
a = str(input())

if int(a[0:4]) > 2019:
    print('TBD')
elif int(a[5:7]) > 4:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
year, month, day = map(int, input().split('/'))

def main():
    if (year >= 2019 and month >= 5) or year >= 2020:
        return 'TBD'
    else:
        return 'Heisei'

if __name__ == '__main__':
    print(main())

Solution (Python):
s=input()
if(int(s[5:7])>4) :
  print('TBD')
else :
  print('Heisei')

Solution (Python):
s=input()
y=s[0:4]
m=s[5:7]
d=s[8:]
ans='Heisei'
if(int(y) < 2019):
    print(ans)
elif(int(y) == 2019):
    print(['TBD',ans][int(m)<=4])
else:
   print('TBD')

Solution (Python):


s=input()
t="2019/04/30"
if s<=t:
    print("Heisei")
else :
    print("TBD")

Solution (Python):
s = input()
m = int(s[5:7])
if m <= 4:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
s = input()
m = int(s[5:7])
if m <= 4:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
s = list(input().split("/"))



if(int(s[0]) < 2019):
    print("Heisei")
elif(int(s[1]) <= 4):
    print("Heisei")
else:
    print("TBD")

Solution (Python):
import datetime

date=datetime.datetime.strptime(input(),"%Y/%m/%d")
if date<=datetime.datetime(2019, 4, 30):
    print("Heisei")
else:
    print("TBD")

Solution (Python):
from datetime import datetime as dt


S = input()
S_datetime = dt.strptime(S, '%Y/%m/%d')
heisei = dt(2019, 4, 30)
if S_datetime <= heisei:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
date = input()

if date <= '2019/04/30':
  print('Heisei')
else:
  print('TBD')

Solution (Python):
from datetime import datetime

str_date = input()
one_date = datetime.strptime(str_date,'%Y/%m/%d')

base_date = datetime(2019,4,30)
if one_date <= base_date:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
s = list(map(int, input().split("/")))
if s[0] >= 2019 and s[1] >= 5:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
S = input()

print('Heisei' if S <= '2019/04/30' else 'TBD')

Solution (Python):
s=[int(i) for i in input().split('/')]
if s[0]>2020 or (s[0]==2019 and s[1]>4):
    print("TBD")
else: print("Heisei")

Solution (Python):
S = input()
if int(S[6]) <= 4 and S[5] != "1":
    print("Heisei")
else:
    print("TBD")

Solution (Python):
year,month,day = map(int,input().strip().split("/"))

if year <= 2019 and month <= 4 and day <= 30:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = input()
ans = "TBD"
if(S <= "2019/04/30"):
  ans = "Heisei"
print(ans)

Solution (Python):
S = input()
ans = "TBD"
if(S <= "2019/04/30"):
  ans = "Heisei"
print(ans)

Solution (Python):
yr,mn,dy=map(int,input().split('/'))
if yr <2019:
  print("Heisei")
elif yr >2019:
  print("TBD")
else:
  if mn<4:
    print("Heisei")
  elif mn>4:
    print("TBD")
  else:
    print("Heisei")

Solution (Python):


y,m,d = map(int,input().split("/"))
if y < 2019:
    print("Heisei")
    print("Heisei")
elif y == 2019 and m < 4:
    print("Heisei")
elif y == 2019 and m == 4 and d <= 30:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
import numpy as np

S = list(map(int,input().split("/")))
if S[1] < 5:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
Y, M, D = map(int, input().split('/'))

if M >= 5:
  print('TBD')
else:
  print('Heisei')

Solution (Python):
s=input()
if int(s[5])==0 and int(s[6])<=4:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
s = list(input())
y = int("".join(s[0:4]))
m = int("".join(s[5:7]))
d = int("".join(s[8:10]))

if y > 2019:
    print("TBD")
elif y < 2019:
    print("Heisei")
else:
    if m > 4:
        print("TBD")
    else:
        print("Heisei")

Solution (Python):
year, month, date = map(int, input().split("/"))
if year < 2019:
        print("Heisei")
elif year == 2019:
        if month<4:
                print("Heisei")
        elif month == 4:
                if date <= 30:
                        print("Heisei")
                else:
                        print("TBD")
        else:
                print("TBD")
else:
        print()

Solution (Python):
Y, M, D = map(int,input().split("/"))
if M<5:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
"""A-Still TBD"""
S=[int(i) for i in input().split("/")]
if S[0]>=2019 and S[1]>4:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
n = input()
if int(n[:4]) < 2019:
    print("Heisei")
elif int(n[5:7]) < 5:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = raw_input()
date = map(int, S.split('/'))
if date <= [2019, 4, 30]:
	print 'Heisei'
else:
	print 'TBD'

Solution (Python):
y,m,d = list(map(int, input().split("/")))
 
if y < 2019 or (y ==2019 and m <=4):
  print("Heisei")
else:
  print("TBD")

Solution (Python):
strings = input().split('/')
s = list(map(int, strings))
flag = 1
if s[0] > 2019:
    flag = 0
elif s[0] == 2019:
    if s[1] > 4:
        flag = 0

ans_list = ['TBD', 'Heisei']
print(ans_list[flag])

Solution (Python):
s = input()

y,m,d = s.split("/")
y = int(y)
m = int(m)
d = int(d)

if y < 2019 :
    print("Heisei")
elif y > 2019 :
    print("TBD")
else :
    if m <= 4 :
        print("Heisei")
    else :
        print("TBD")

Solution (Python):
y,m,d = map(str,input().split('/'))
print('Heisei') if int(y+m+d) <= 20190430 else print('TBD')

Solution (Python):
s=input()
print("Heisei" if s <= "2019/04/30" else "TBD")

Solution (Python):
y,m,d = list(map(int, input().split("/")))

if y < 2019 or (y ==2019 and m <=4):
  print("Heisei")
else:
  print("TBD")

Solution (Python):
y,m,d = list(map(int, input().split("/")))

if y < 2019:
  print(Heisei)
elif y ==2019 and m <=4:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
Y, M, D = map(int, input().split("/"))
boo = False
if Y < 2019:
  boo = True
else:
  if Y == 2019 and M <= 4:
    boo = True
if boo:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
year,month,day=map(int,input().split("/"))
if 10000*year+100*month+day<=20190430:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
y, m, d = map(int, input().split('/'))
if y*10000+m*100+d<=20190430:
	print('Heisei')
else:
	print('TBD')

Solution (Python):
S = input()
month = int(S[5]+S[6])
if month >= 5:
	print("TBD")
else:
	print("Heisei")

Solution (Python):
s=input().split("/")
if int(s[1])<5:print("Heisei")
else:print("TBD")

Solution (Python):
S = int(input().replace('/', ''))
if S <= 20190430:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
S = str(input())

array = S.split('/')

heise = ['01', '02', '03', '04']

if array[1] in heise:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
S = input()
S = S.split('/')
if int(S[1]) < 4:
    print('Heisei')
    exit()
if int(S[1]) == 4:
    if int(S[2]) < 31:
        print('Heisei')
        exit()
print('TBD')

Solution (Python):
s = input()
t = int(s.replace('/',''))
if t <= 20190430:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
S = [int(i) for i in input().split("/")]
answer = ""
if(S[0] < 2019):
    answer = "Heisei"
elif(S[0] > 2019):
    answer = "TBD"
else:
    if(S[1] <= 4):
        answer = "Heisei"
    else:
        answer = "TBD"
print(answer)

Solution (Python):
import datetime
date_str = input()
input_date = datetime.datetime.strptime(date_str, "%Y/%m/%d")
comp = datetime.datetime(2019,4,30,0,0,0)
if input_date <= comp:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = input()
S = int(''.join(S.split('/')))
if S <= 20190430:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
dates = [x for x in input().split("/")]
number = int(dates[0]+dates[1]+dates[2])

if number >  20190430:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
S = list(map(int,input().split("/")))

if S[0]>2019:
    print("TBD")
elif S[1]>4:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
if int("".join(input().split('/'))) <= 20190430:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
S = int("".join(input().split("/")))
day_before_tbd = 20190430

if S <= day_before_tbd:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = [int(i) for i in input().split('/')]

def f(S):
    if S[0] < 2019:
        return False
    elif S[0] > 2019:
        return True
    else:                                                                                                      
        if S[1] < 4:
            return False
        elif S[1] > 4:
            return True
        else:
            if S[2] <= 30:
                return False
            else:
                return True

if f(S):
    print('TBD')
else:
    print('Heisei')

Solution (Python):
s=input()
f=0
if(int(s[0:4])>2019):
	f=1
elif(int(s[0:4])==2019 and int(s[5:7])>4):
	f=1

if(f==0):
	print("Heisei")
else:
	print("TBD")

Solution (Python):
year, month, day = map(int, input().split("/"))

if month >= 5:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
s = list(map(int, input().split('/')))
if s[0] == 2019 and s[1] > 4:
  print("TBD")
elif s[0] >2019:
  print("TBD")
else : print("Heisei")

Solution (Python):



S = input()
S = int(S.replace("/", ""))

if S > 20190430 : print("TBD")
else : print("Heisei")

Solution (Python):

print('Heisei' if input() <= '2019/04/30' else 'TBD')

Solution (Python):
s = input()
m = s[5:7]
if int(m)>=5:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
A,B,C=input().split("/")
B=int(B)
C=int(C)
if B<4 :
  print("Heisei")
elif B==4 and C<=30 :
  print("Heisei")
else :
  print("TBD")

Solution (Python):

Y, M, D = map(int, input().strip().split('/'))
if Y < 2019:
	print('Heisei')
else:
	if M < 5:
		print('Heisei')
	else:
		print('TBD')

Solution (Python):
s = input()
if int(s[:4]) > 2019:
  print("TBD")
elif int(s[5:7]) >= 5:
  print("TBD")
else:
  print("Heisei")

Solution (Python):


import datetime 

s = input()

if datetime.datetime.strptime(s, "%Y/%m/%d") <= datetime.datetime(2019, 4, 30, 23, 59, 59):print("Heisei")
else: print("TBD")

Solution (Python):
S = input()
if int(S[5:7]) <= 4:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
S = input()
S = S.split("/")
S = [int(s) for s in S]
if S[0] <= 2019 and S[1] <= 4 and S[2] <=30:
    print("Heisei")
else:
    print("TBD")

Solution (Python):

import datetime

S=input()
comp1=datetime.datetime.strptime(S,"%Y/%m/%d")
comp2=datetime.datetime(2019,4,30,23,59,59)

if comp1<=comp2:
 print("Heisei")
else:
 print("TBD")

Solution (Python):

y, m, d = map(int, input().split('/'))

if y >= 2019 and m >= 5:
    print ('TBD')
else:
    print('Heisei')

Solution (Python):
y,m,d = map(str, input().split("/"))
ymd = int(y + m + d)
if ymd <= 20190430:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
y,m,d = map(int,input().split("/"))
if m<=4:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
y, m, d=map(int, input().split("/"))

if y<2019:
    print("Heisei")
elif y>2019:
    print("TBD")
else:
    if m>4:
        print("TBD")
    if m<=4 and d<=31:
        print("Heisei")

Solution (Python):
y1, y2, y3, y4, a, m1, m2, b, d1, d2 = input()

m1 = int(m1)
m2 = int(m2)

if(m1==1):
    print("TBD")
else:
    if(m2>=5):
        print("TBD")
    else:
        print("Heisei")

Solution (Python):
import datetime as dt
y, m, d = map(int, input().split("/"))
i = dt.date(y, m, d)
h  = dt.date(2019,4,30)
print("Heisei" if(i<=h) else "TBD")

Solution (Python):
s = str(input())

nexts = s.replace("/","")

sint = int(nexts)

if sint <= 20190430:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = list(map(int, input().split('/')))

if S[0] >= 2020:
    print("TBD")
elif S[1] > 4:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
print('Heisei' if input() <= '2019/04/30' else 'TBD')

Solution (Python):
A,B,C=map(int,input().split("/"))
if A>2019 or (A==2019 and B>=5):
  print("TBD")
else:
  print("Heisei")

Solution (Python):
s = input()
if(s<= '2019/04/30'): 
	print("Heisei")
else: 
	print("TBD")

Solution (Python):
s = input();
list = s.split("/");
[y,m,d] = list;
flag = False;
if int(y)<2019:
    flag = True;
elif int(y) == 2019:
    if int(m) <= 4:
        flag = True;
if flag:
    print("Heisei");
else:
    print("TBD");

Solution (Python):
y, m, d = map(str, input().split("/"))
ymd = int(y + m + d)
if ymd <= 20190430:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
S=input()
number=int(S[:4]+S[5:7]+S[8:])
if number<=20190430:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
s=input()
if int(s[5:7])<5:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
s=input()
if int(s[5:7]+s[8:10])<431:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = list(map(int, input().split('/')))
if S[0] > 2019:
    print("TBD")
elif S[0] == 2019:
    if S[1] <= 4:
        print("Heisei")
    else:
        print("TBD")
else:
    print("Heisei")

Solution (Python):
s=list(input())
if s[6]=='5' or s[6]=='6' or s[6]=='7' or s[6]=='8' or s[6]=='9' or s[5]=='1':
    print('TBD')
else:
    print('Heisei')

Solution (Python):
data = list(map(int, input().split("/")))
if data[1] <= 4:
    print("Heisei")
else:
    print("TBD")

Solution (Python):

import sys
from datetime import datetime


def solve(S: str):
    if datetime.strptime(S, "%Y/%m/%d") <= datetime.strptime("2019/4/30", "%Y/%m/%d"):
        print("Heisei")
    else:
        print("TBD")



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)


if __name__ == "__main__":
    main()

Solution (Python):
S = input()
y,m,d = map(int,S.split('/'))
ans = 'TBD'
if y <= 2019 and m <= 4 and d <= 30 or y < 2018:
    ans = 'Heisei'
print(ans)

Solution (Python):
y,m,d=map(int, input().split('/'))
if y < 2019:
    print('Heisei')
elif y == 2019 and m <= 4:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
a = input()
if(a > "2019/04/30"):
  print("TBD")
else:
  print("Heisei")

Solution (Python):
s = input()
print('TBD' if 5 <= int(s[5:7]) else 'Heisei')

Solution (Python):
print("Heisei" if int(input()[5:7])<5 else "TBD")

Solution (Python):
import re

S = input()
m = re.search(r"(?P<year>\d{4})/(?P<month>\d{2})/(?P<date>\d{2})", S)
year = int(m.group("year"))
month = int(m.group("month"))
date = int(m.group("date"))

if year < 2019:
    print("Heisei")
elif year > 2019:
    print("TBD")
elif month < 4:
    print("Heisei")
elif month > 4:
    print("TBD")
elif date <= 30:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
a = input().split("/")

if int(a[0]) < 2019:
  print("Heisei")
elif int(a[0]) == 2019 and int(a[1]) <= 4:
  print("Heisei")
elif int(a[0]) == 2019 and int(a[1]) >= 5:
  print("TBD")
else:
  print("TBD")

Solution (Python):
a = input()
date = list(a)
year = int(date[0])*1000 + int(date[1])*100 + int(date[2])*10 + int(date[3])
mon = int(date[5])*10 + int(date[6])
day = int(date[8])*10 + int(date[9])
if year < 2019 or mon < 5 :
  print("Heisei")
else :
  print("TBD")

Solution (Python):
y,m,d=map(int,input().split('/'))
print('Heisei' if y<=2019 and m<= 4 and d <= 30 else 'TBD')

Solution (Python):
import datetime
Y, M, D = map(int, input().split('/'))

if datetime.date(2019, 4, 30) >= datetime.date(Y,M,D):
    print('Heisei')
else:
    print('TBD')

Solution (Python):
import sys
from datetime import datetime

S = input()
s_date = datetime.strptime(S, '%Y/%m/%d')
last_heisei = datetime.strptime('2019/04/30', '%Y/%m/%d')

if s_date > last_heisei:
    print('TBD')
else:
    print('Heisei')

Solution (Python):

import datetime

y,m,d = map(int, input().split('/'))
if y<2019:
    print('Heisei')
elif y>2019:
    print('TBD')
else:
    if m<4:
        print('Heisei')
    elif m>4:
        print('TBD')
    else:
        if d<=30:
            print('Heisei')
        else:
            print('TBD')

Solution (Python):
import datetime

date = datetime.datetime.strptime(input(), '%Y/%m/%d').date()

if date < datetime.date(2019, 5, 1):
  print('Heisei')
else:
  print('TBD')

Solution (Python):





def main():
    S = input()
    Y, M, D = map(int, S.split("/"))

    heisei = False
    if Y < 2019:
        heisei = True
    elif Y == 2019 and M < 5:
        heisei = True

    print("Heisei" if heisei else "TBD")

if __name__ == "__main__": main()

Solution (Python):
y, m, d = [int(i) for i in input().split("/")]

if (y > 2019):
    print("TBD")
elif ((y == 2019) & (m > 4)):
    print("TBD")
else:
    print("Heisei")

Solution (Python):
flag = 0
year, month, day = input().split("/")

if int(month[0]) > 0:
    flag = 1
elif int(month[1]) > 4:
    flag = 1

if flag == 0:
    print("Heisei")
elif flag == 1:
    print("TBD")

Solution (Python):
import sys
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip() 

y,m,d = list(map(int, stdin.readline().split('/')))

a = True
if y>2019:
  a = False
elif y==2019:
  if m>4:
    a = False
  elif m==4:
    if d > 30:
      a = False

print("Heisei" if a else "TBD")

Solution (Python):
y,m,d = list(map(int,input().split('/')))
if y > 2019:
	print('TBD')
elif y == 2019 and m >4:
	print('TBD')
else:
	print('Heisei')

Solution (Python):
S = input()
_, m, _ = S.split("/")
m = int(m)
if m<=4:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = input()
if(S <= "2019/04/30"):
  print("Heisei")
else:
  print("TBD")

Solution (Python):
s = input()
year = int(s[0:4])
month = int(s[5:7])
 
if year >= 2019 and month >= 5:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
S = input()

if S <= '2019/04/30':
  print('Heisei')
else:
  print('TBD')

Solution (Python):
import datetime
s = input()
date = datetime.datetime.strptime(s, '%Y/%m/%d')
d = datetime.datetime(2019, 4, 30)
if date -d <= datetime.timedelta(days = 0):
    print('Heisei')
else:
    print('TBD')

Solution (Python):
import datetime
S = datetime.datetime.strptime(input(), '%Y/%m/%d')
if datetime.date(S.year, S.month, S.day) <= datetime.date(2019,4,30):
  print('Heisei')
else:
  print('TBD')

Solution (Python):
date =list(map(int,input().split('/')))
print('TBD' if date[1]*31+date[2]>=155 else 'Heisei')

Solution (Python):
a = input()
l = list(a)
year = int(l[0]) * 1000 + int(l[1]) * 100 + int(l[2]) * 10 + int(l[3])
month = int(l[5]) * 10 + int(l[6])
date = int(l[8]) * 10 + int(l[9])

if year < 2019 or month < 5:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
a=input().split('/')
if int(a[0])<2019 or int(a[1])<5 :
    print('Heisei')
else :
    print('TBD')

Solution (Python):
y,m,d = [int(s) for s in input().rstrip().split("/")]

if y == 2019:
  if m >= 5:
    print("TBD")
    exit()
elif y > 2019:
  print("TBD")
  exit()

print("Heisei")

Solution (Python):
S = input()

year = int(S[:4])
month = int(S[5:7])
day = int(S[8:])

if (year <= 2018):
    print('Heisei')
elif (year==2019):
    if (month <= 4):
        print('Heisei')
    else:
        print('TBD')
else:
    print('TBD')

Solution (Python):
S = input()
print('Heisei' if S<='2019/04/30' else 'TBD')

Solution (Python):
y, m, d = map(int, input().split('/'))

if y < 2019 or y == 2019 and (m < 4 or m == 4 and d < 31):
    print('Heisei')
else:
    print('TBD')

Solution (Python):
m = int(''.join(list(input().split('/'))))
if m > 20190430:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
print("Heisei" if input() <= "2019/04/30" else "TBD")

Solution (Python):
usr=input()
lst = usr.split('/')
a = int(lst[0])
string = lst[1]
if string[0] == '0':
  b = int(string[1])
else:
  b = int(string)

if a <= 2019 and b <5:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
input = input()
a,b,c = map(int,input.split("/"))
if(a>2019 or (a == 2019 and b >4 ) or (a == 2019 and b == 4 and c > 30 )):
  print("TBD")
else:
  print("Heisei")

Solution (Python):
x=list(map(int,input().split('/')))
if x[1]<=4:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
s=input()
if s<="2019/04/30":
	print('Heisei')
else:
	print('TBD')

Solution (Python):
s=input()
if s<="2019/04/30":
	print('Heisei')
else:
	print('TBD')

Solution (Python):
S = input()
print('Heisei' if S <= '2019/04/30' else 'TBD')

Solution (Python):
a,b,c = map(int,input().split("/"))
if b > 4:
  print("TBD")
elif b <= 4 and c<=30:
  print("Heisei")

Solution (Python):
import datetime
d=datetime.datetime.strptime(input(),'%Y/%m/%d')
print('Heisei' if d<=datetime.datetime(2019,4,30) else 'TBD')

Solution (Python):
S = int(input().replace("/", ""))

if S <= 20190430:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
a,b,c = map(int,input().split("/"))
if b > 4:
  print("TBD")
elif b <= 4 and c<=30:
  print("Heisei")

Solution (Python):

import datetime
base_date = datetime.datetime(2019, 4, 30, 23, 59, 59)

date_str = input()
in_date = datetime.datetime.strptime(date_str, "%Y/%m/%d")
if in_date <= base_date:
  print( "Heisei" )
else:
  print( "TBD" )

Solution (Python):
y,m,d=map(int,input().split("/"))
if y<=2018 :
    print("Heisei")
elif y==2019 :
    if m<=4 :
        print("Heisei")
    else:
        print("TBD")
else :
    print("TBD")

Solution (Python):
yy,mm,dd = map(int,input().split('/'))
if yy>=2019 and mm>=5:
  print('TBD')
else:
  print('Heisei')

Solution (Python):
print('Heisei' if input() <= '2019/04/30' else 'TBD')

Solution (Python):
yy, mm, dd = input().split('/')

last_yy, last_mm, last_dd = '2019/04/30'.split('/')

print('Heisei' if last_yy >= yy and last_mm >= mm and last_dd >= dd else 'TBD')

Solution (Python):
yy, mm, dd = input().split('/')

last_yy, last_mm, last_dd = '2019/04/30'.split('/')
if last_yy < yy:
    ans = 'TBD'
else:
    if last_mm < mm:
        ans = 'TBD'
    else:
        if last_dd < dd:
            ans = 'TBD'
        else:
            ans = 'Heisei'

print(ans)

Solution (Python):
import datetime

a  = (datetime.datetime.strptime('2019/04/30', '%Y/%m/%d') - datetime.datetime.strptime(input(), '%Y/%m/%d')).days

print('Heisei' if a >= 0 else 'TBD')

Solution (Python):
S = input()
yyyy, mm, dd = map(int, S.split('/'))
if yyyy < 2019:
    print('Heisei')
elif 2019 < yyyy:
    print('TBD')
else:
    if mm < 5:
        print('Heisei')
    else:
        print('TBD')

Solution (Python):
S = input()
yyyy, mm, dd = map(int, S.split('/'))
if yyyy < 2019:
    print('Heisei')
elif 2019 < yyyy:
    print('TBD')
else:
    if mm < 5:
        print('Heisei')
    else:
        print('TBD')

Solution (Python):
S = input()
yyyy, mm, dd = map(int, S.split('/'))
if yyyy < 2019:
    print('Heisei')
elif 2019 < 2019:
    print('TBD')
else:
    if mm < 5:
        print('Heisei')
    else:
        print('TBD')

Solution (Python):
s = []
s = input().split("/")
a = "Heisei"

if int(s[0]) >= 2018:
    if int(s[1]) > 4:
        a = "TBD"
print(a)

Solution (Python):
S = input().split("/")


if int(S[0])>= 2020:
  print("TBD")
elif int(S[0]) == 2019:
  if int(S[1]) >=5:
    print("TBD")
  else:
    print("Heisei")
else:
  print("Heisei")

Solution (Python):
year, month, day = map(int,input().split("/"))
if year > 2019 or (year == 2019 and month > 4) or (year == 2019 and month == 4 and day > 30):
    print("TBD")
else:
    print("Heisei")

Solution (Python):
S = input()
print('Heisei' if S <= '2019/04/30' else 'TBD')

Solution (Python):
S = input()
if S <= '2019/04/30':
    print('Heisei')
else:
    print('TBD')

Solution (Python):
S = input()
if S <= '2019/04/30':
    print('Heisei')
else:
    print('TBD')

Solution (Python):
S = input()
if S <= '2019/04/30':
    print('Heisei')
else:
    print('TBD')

Solution (Python):
y, m, d = map(int, input().split('/'))
ans = 'TBD'
if y < 2019:
    ans = 'Heisei'
elif y == 2019:
    if m < 4:
       ans = 'Heisei'
    elif m == 4:
        if d <= 30:
            ans = 'Heisei'
print(ans)

Solution (Python):
S = list(map(int,input().split("/")))
if S[0] == 2019 and S[1] >= 5 or S[0] >=2020:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
s = input()
x = int(s[0:4]+s[5:7]+s[8:])
print("Heisei" if x <= 20190430 else "TBD")

Solution (Python):
year, month, day = input().split('/')
yyyymmdd = int(year+month+day)
if yyyymmdd > 20190430:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
date = input().split('/')

if int(date[0]) > 2019:
  print('TBD')
  
elif int(date[0]) == 2019 and int(date[1]) > 4:
  print('TBD')
  
else:
  print('Heisei')

Solution (Python):
yyyy,mm,dd = map(int,input().split("/"))

if yyyy >= 2019 and mm > 4:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
yyyy,mm,dd = map(int,input().split("/"))

if yyyy == 2019 and mm == 4 and dd == 30:
    print("Heisei")
    exit()

if yyyy >= 2019:
    if mm > 4:
        print("TBD")
    else:
        print("Heisei")
else:
    print("Heisei")

Solution (Python):


if __name__ == "__main__":
    date = input()
    year, month, day = date.split("/")

    if int(year) <= 2019:
        if int(month) <= 4:
            if int(day) <= 30:
                print("Heisei")
                exit()
    
    print("TBD")

Solution (Python):
def ans():
  S = input()
  if(S <= "2019/04/30"):
    print("Heisei")
  else:
    print("TBD")
ans()

Solution (Python):
Y,M,D=map(int,input().split("/"))
if M<=4:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
S = input()

print("Heisei" if int(S[5:7]) < 5 else "TBD")

Solution (Python):
import datetime
a = input().split("/")

date1 = datetime.datetime(int(a[0]), int(a[1]), int(a[2]))
date2 = datetime.datetime(2019, 4, 30)

if date1 > date2:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
def main():
    y, m, d = map(int, input().split("/"))
    if y < 2019 or y == 2019 and m < 4 or y == 2019 and m == 4 and d < 31:
        print("Heisei")
    else:
        print("TBD")


if __name__ == "__main__":
    main()

Solution (Python):
S = input()
y,m,d = S.split("/")
if int(y) <= 2019 and int(m) <= 4 and int(d) <= 30:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
Y,M,D = map(int,input().split("/"))
if M <= 4:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = input()
if S > "2019/04/30":
    print("TBD")
else:
    print("Heisei")

Solution (Python):
y, m, d = map(int, input().split("/"))
if y <= 2018:
    heisei = True
elif y == 2019 and m <= 4:
    heisei = True
else:
    heisei = False
if heisei:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
print("Heisei") if input()[5:7]<="04" else print("TBD")

Solution (Python):
s=input();print("Heisei") if s[5:7]<="04" else print("TBD")