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):
a, b, c = list(map(int, input().split("/")))
 
if (b<=4) and (c<=30):
    print("Heisei")
else:
    print("TBD")

Solution (Python):
from datetime import datetime as dt
S = input()
D = dt.strptime(S,'%Y/%m/%d')
H = dt.strptime('2019/04/30','%Y/%m/%d')
if D<=H: print('Heisei')
else: print('TBD')

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

Solution (Python):
import sys,datetime
input = sys.stdin.readline

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

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

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

Solution (Python):
print('TBD'*(input()[5:7]>'04')or'Heisei')

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

if M <= 4:
    if D <= 30:
        print("Heisei")
    else:
        print("TBD")
else:
    print("TBD")

Solution (Python):
import sys

rr = lambda: sys.stdin.readline().rstrip()

s = rr()
if s[5:7] > '04':
  print('TBD')
else:
  print('Heisei')

Solution (Python):
import sys

rr = lambda: sys.stdin.readline().rstrip()

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

Solution (Python):
import sys

rr = lambda: sys.stdin.readline().rstrip()

s = rr()
if s[5:5+2] > '04':
  print('TBD')
else:
  print('Heisei')

Solution (Python):

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

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

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

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

if int(s[0]) <= 2019:
  if int(s[1]) <= 4:
    if int(s[2]) <= 30:
      answer = "Heisei"
      
print(answer)

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

Solution (Python):
def main():
    s = list(map(int, input().split("/")))
    if s[0] > 2019:
        print("TBD")
        return
    
    if s[1] > 4:
        print("TBD")
        return

    
    if s[2] > 30:
        print("TBD")
        return

    print("Heisei")

if __name__ == "__main__":
    main()

Solution (Python):
s=input()
t=s[:4]
u=s[5:7]
v=s[8:]
w=int(t+u+v)

if w<=20190430:
  print('Heisei')
  
else:
  print('TBD')

Solution (Python):
li = input().split('/')
if int(li[0]) > 2019:
    print('TBD')
else:
    if int(li[1]) <= 4:
        print('Heisei')
    else:
        print('TBD')

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

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

Solution (Python):
S=input()

num=int(S[:4]+S[5:7]+S[8:])


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

Solution (Python):
import sys
S=input()
a,b,c=map(int,S.split("/"))
if a<=2019:
  if b<=4:
    print("Heisei")
    sys.exit()
print("TBD")

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

if s[0] <= 2019 and s[1] <= 4 and s[2] <= 30:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
S = input()

y = S[0:4]
m = S[5:7]
d = S[8:10]

if y < "2019":
    print("Heisei")

elif (y == "2019") and (m < "04"):
    print("Heisei")

elif (y == "2019") and (m == "04") and (d <= "30"):
    print("Heisei")

elif (y == "2019") and (m == "04") and (d > "30"):
    print("TBD")

elif (y == "2019") and (m >= "05"):
    print("TBD")

elif (y > "2019"):
    print("TBD")

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

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

Solution (Python):
import sys


s = sys.stdin.readline().split('/')
if int(s[0]) < 2019:
    ans = 'Heisei'
if int(s[0]) == 2019 and int(s[1]) <= 4:
    ans = 'Heisei'
else:
    ans = 'TBD'
print(ans)

Solution (Python):
s=input()
num=int(s[:4]+s[5:7]+s[8:])
if num<=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 M <= 4:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
import datetime
year,month,day = map(int, input().split("/"))
comp1 = datetime.datetime(year, month, day, 0, 0, 0)
comp2 = datetime.datetime(2019, 4, 30, 0, 0, 0)
print("Heisei" if (comp1 <= comp2) else "TBD")

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

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

Solution (Python):
from datetime import datetime as dt
tstr = input()
tdatetime  = dt.strptime(tstr, '%Y/%m/%d')
tstr = '2019/04/30'
heiseitime = dt.strptime(tstr, '%Y/%m/%d')
if heiseitime >= tdatetime:
  print("Heisei")
else:
  print("TBD")

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

Solution (Python):
import datetime
t = datetime.datetime.strptime("2019/04/30","%Y/%m/%d")
s = datetime.datetime.strptime(input(),"%Y/%m/%d")
print("Heisei") if t>=s else print("TBD")

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

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

Solution (Python):


s = int(input().replace('/', ''))

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

Solution (Python):
S = input()

now = int(S[5:7]+S[8:10])
if now <= 430:
    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('Heisei')
  elif m > 4:
    print('TBD')
  else:
    if d <= 30:
      print('Heisei')
    else:
      print('TBD')

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

Solution (Python):
import datetime as dt
S=input()
s=dt.datetime.strptime(S,'%Y/%m/%d')
A='2019/04/30'
a=dt.datetime.strptime(A,'%Y/%m/%d')
if s<=a:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
S = input()

M = int(S[5 : 7])

print('TBD' if M > 4 else 'Heisei')

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

Solution (Python):
a,b,c=map(int,input().split("/"))
print("Heisei"if b<5 else "TBD")

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

def f(y,m,d):
	if m < 4: return True
	if m == 4 and d <= 30: return True
	return False
print 'Heisei' if f(y,m,d) else 'TBD'

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

Solution (Python):
s = list(input())
del s[7]
del s[4]
print("Heisei" if int(''.join(s)) <= 20190430 else "TBD")

Solution (Python):
def main():
    s = list(str(input()))
    if s[5] == '1':
        print('TBD')
    elif s[6] != '1' and s[6] != '2' and s[6] != '3' and s[6] != '4':
        print('TBD')
    else:
        print('Heisei')

main()

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

if __name__ == "__main__":
    main()

Solution (Python):
import datetime
s = input().split("/")
if datetime.date(2019,4,30) >= datetime.date(int(s[0]), int(s[1]), int(s[2])):
    print('Heisei')
else:
    print('TBD')

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

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


if __name__ == '__main__':
    solve()

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

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

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

Solution (Python):

import sys


def solve(S: str):
    return "Heisei" if S <= "2019/04/30" else "TBD"


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

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    
    main()

Solution (Python):
yyyy, mm, dd = input().split('/')
year = int(yyyy)
month = int(mm)
day = int(dd)
if year <= 2018:
  print('Heisei')
elif year == 2019:
  if month <= 3:
    print('Heisei')
  elif month == 4:
    print('Heisei')
  else:
    print('TBD')
else:
  print('TBD')

Solution (Python):
print('HTeBiDs e i'[int(input().replace('/',''))>20190430::2])

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

Solution (Python):

date = list(map(int,input().split('/')))
if date[1] >= 5:
    print ('TBD')
else:
    print('Heisei')

Solution (Python):
s = input()
y, m, d = map(int, s.split('/'))
if m >= 5:
    print('TBD')
elif y >= 2020:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
S = input()
if int(S[:4]) == 2019:
    if int(S[5:7]) == 4:
        if int(S[8:-1]) == 30:
            print('Heisei')
        elif int(S[8:-1]) >= 31:
            print('TBD')
        else:
            print('Heisei')
    elif int(S[5:7]) >= 5:
        print('TBD')
    else:
        print('Heisei')
elif int(S[:4]) >= 2020:
    print('TBD')
else:
    print('Heisei')

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

if m<=4:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
print(['Heisei','TBD'][int(input()[5:7])>4])

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()
if s <= '2019/04/30':
    print('Heisei')
else:
    print('TBD')

Solution (Python):
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

in_n = lambda: int(readline())
in_nn = lambda: map(int, readline().split())
in_s = lambda: readline().rstrip().decode('utf-8')


def main():

    S = in_s()
    date = int(S[0:4] + S[5:7] + S[8:])
    if date <= 20190430:
        ans = 'Heisei'
    else:
        ans = 'TBD'

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):

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

Solution (Python):
S = input()

yyyy = int(S[:4])
mmdd = int(S[5:7] + S[8:])

ans = "TBD"

if  yyyy < 2019:
    ans = "Heisei"
elif yyyy == 2019:
    if mmdd <= 430:
        ans = "Heisei"
        
print(ans)

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

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

Solution (Python):
from datetime import datetime
y,m,d=map(int,input().split('/'))
print(['Heisei','TBD'][datetime(y,m,d)>datetime(2019,4,30)])

Solution (Python):
print('Heisei'if input()[5:]<'04/31'else'TBD')

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

Solution (Python):
s = input()
if int(s[5]) != 0:
    print("TBD")
else:
    if int(s[6]) >= 5:
        print("TBD")
    else:
        print("Heisei")

Solution (Python):
s = input()

a = int(s.replace("/", ""))

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

Solution (Python):
S0,S1,S2=input().split("/")
if int(S1)<5:
  print("Heisei")
else:
  print("TBD")

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

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

Solution (Python):
import math
def ip():return int(input())
def inp():return map(int,input().split())
def inpstr():return map(str,input().split())
def linp():return list(map(int,input().split()))
def linpstr():return list(map(str,input().split()))

s=input()
k=s.find('/')
y=int(s[:k])
s=s[k+1:]
k=s.find('/')
m=int(s[:k])
d=int(s[k+1:])

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

Solution (Python):
s = input()

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

Solution (Python):
s = input()

a = int(s[5])
b = int(s[6])

if a == 0 and b <= 4:
  print('Heisei')
else:
  print('TBD')

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

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

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

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

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

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

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

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

Solution (Python):
a, b, c = input().split("/")
print("Heisei" if b<="04" else "TBD")

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

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

Solution (Python):






from collections import deque



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

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

Solution (Python):
a,b,c = map(int,input().split('/'))
if b >= 5:
    print('TBD')
else:
    print('Heisei')

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

Solution (Python):
import datetime


s = input()

target = datetime.datetime.strptime(s, '%Y/%m/%d')
heisei = datetime.datetime(2019, 4, 30)


if (target - heisei).days <= 0:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
S=input()

if int(S[6])>=5 or int(S[5])==1:
  print('TBD')
else:
  print('Heisei')

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

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

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

Solution (Python):
S = input()

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

Solution (Python):

import datetime

s = str(input())

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

a = datetime.date(year, month, day)
b = datetime.date(2019, 4, 30)

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

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

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

Solution (Python):
import sys
import math
from collections import Counter
import itertools
import fractions
import datetime
from decimal import Decimal



def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())

def LI(): return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'


p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")



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

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

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

Solution (Python):
s = input()

y = int(s[0:4])
m = int(s[5:7])
d = int(s[8:12])

if(m <= 4 and d <=30):
  print("Heisei")
else:
  print("TBD")

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

Solution (Python):
import re
s=input()
a=re.search('([0-9]{4})/([0-9]{2})/([0-9]{2})',s)
if int(str(a.group(2)))<=4:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
from datetime import datetime
s=input()
sdate=datetime.strptime(s,"%Y/%m/%d")
cdate=datetime.strptime("2019/04/30","%Y/%m/%d")
print("Heisei" if sdate<=cdate else "TBD")

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

Solution (Python):
from datetime import datetime as dt
s = input()
s = dt.strptime(s, '%Y/%m/%d')
cm = dt.strptime("2019/4/30", '%Y/%m/%d')

if (s-cm).days > 0:
    print("TBD")
else:
    print("Heisei")

Solution (Python):

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

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

Solution (Python):
import re
s=input()
S=re.sub(r'([0-9]{4})/([0-9]{2})/([0-9]{2})',r'\1\2\3',s)
if int(S)<=20190430:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
_,b,c=map(int,input().split('/'))
print('HTeBiDs e i'[b>4::2])

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

Solution (Python):
s=input()


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

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

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

Solution (Python):
s = tuple(map(int, input().rstrip().split('/')))
if s[1] > 4:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
s = S()
if s[5] == '1':
    print('TBD')
elif int(s[6]) < 5:
    print('Heisei')
else:
    print('TBD')

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

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

ans = "Heisei"
if int(s1[0]) >= 2019:
    if int(s1[1]) >= 5:
        ans = "TBD"

print(ans)

Solution (Python):
s=input()

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

Solution (Python):
def main():
  s = input()
  if int(s[0:4])<=2018:
    print( "Heisei" )
  elif int(s[0:4])==2019:
    if int(s[5:7])<=4:
      print( "Heisei" )
    else:
      print( "TBD" )
  else:
      print( "TBD" )
  
main()

Solution (Python):
s = input()

year = s[:4]
month = s[5:7]
day = s[8:10]

a_day = int(year + month + day)

if 20190430 < a_day:
    print('TBD')
else:
    print('Heisei')

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

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

Solution (Python):
s = input()

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

Solution (Python):
S = input()


if int(S[0:4]) < 2019:
    print('Heisei')

elif int(S[5:7]) < 4:
    print('Heisei')

elif int(S[5:7]) == 4 and int(S[8:10]) <= 30:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
s=input()
if s[5:7] in ['01','02','03']:
  print('Heisei')
elif s[6:7] == '4' and int(s[-2:-1]) <= 30:
  print('Heisei')
else:
  print('TBD')

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

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()
inf = float("inf") 

import datetime
chk = datetime.datetime.strptime("2019/5/1","%Y/%m/%d")
s   = datetime.datetime.strptime(input(),"%Y/%m/%d")
if s<chk:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
import re
s=input()
a=re.search('([0-9]{4})/([0-9]{2})/([0-9]{2})',s)

if int(a.group(2))>4:
    print("TBD")
else:
    print("Heisei")

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

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

Solution (Python):
s=input()
if int(s[5:5+2]) >=5:
  print("TBD")
else:
  print("Heisei")

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

else:
  print('TBD')

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

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

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

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

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

Solution (Python):
s = input()
year = int(s[:4])
month = int(s[5:7])
day = int(s[9:])
if year > 2019:
  print('TBD')
elif year < 2019:
  print('Heisei')
else:
  if month > 4:
    print('TBD')
  elif month < 4:
    print('Heisei')
  else:
    if day > 30:
      print('TBD')
    else:
      print('Heisei')

Solution (Python):
S = str(input())
int_S = int(S.replace('/',''))

if int_S>=20190431:
  print("TBD")
else:
  print("Heisei")

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

Solution (Python):

S = input()


yy, mm, dd = S.split("/")
if int(yy) >= 2019 and int(mm) >= 5:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
import datetime

S = datetime.date(*map(int, input().split('/')))
x = datetime.date(2019, 4, 30)

print('Heisei' if S <= x else 'TBD')

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

if m < 5:
    print('Heisei')
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:
    print ("Heisei")
    exit ()

if y == 2019:
    if m < 4:
        print ("Heisei")
        exit ()
    elif m == 4:
        if d <= 30:
            print ("Heisei")
            exit ()
    else:
        pass

print ("TBD")

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

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

Solution (Python):
s=input()

if int(s[:4]) < 2019:
    print("Heisei")
else:
    if s[5:7] in ["01","02","03","04"]:
        print("Heisei")
    else:
        print("TBD")

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

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

Solution (Python):
s = input()

if s > "2019/04/30":
    print("TBD")
else: print("Heisei")

Solution (Python):
S = list(map(str,input().split('/')))
A = int(S[0]+S[1]+S[2])
if A > 20190430:
  print('TBD')
else:
  print('Heisei')

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

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

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

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

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def main():
    S = input()
    if int(S[5:7]) <= 4: print("Heisei")
    else: print("TBD")



if __name__ == "__main__":
    main()

Solution (Python):


import sys






















def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    L = list(map(int, input().split('/')))
    print('Heisei') if L <= [2019, 4, 30] else print('TBD')
    

if __name__ == "__main__":
    main()

Solution (Python):
s = input()
a = int(s[:4])
b = int(s[5:7])
c = int(s[8:])
n = a * 10000 + b * 100 + c
if n <= 20190430:
    print("Heisei")
else:
    print("TBD")

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

Solution (Python):
s = input()
if int(s[:4]) <= 2019:
    if int(s[5:7]) <= 4:
        if int(s[8:]) <= 30:
            print("Heisei");exit()
print("TBD")

Solution (Python):
s=input()
month=int(s[5:7])
day=int(s[8:10])
if month>=5:
  print("TBD")
elif day==31:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


s = S()
y = int(s[:4])
m = int(s[5:7])
d = int(s[8:])
if y < 2019 or (y == 2019 and m < 5):
    print("Heisei")
else:
    print("TBD")

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

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

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

Solution (Python):
s = input()
a = s.split('/')

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

Solution (Python):
s =  input()

if int(s[5:7]) > 4:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
s=str(input())
s=list(s)
if s[5]=="0" and (s[6]=="1" or s[6]=="2" or s[6]=="3" or s[6]=="4"):
  print("Heisei")
else:
  print("TBD")

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

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

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

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

Solution (Python):
s=str(input())
if int(s[0:4])*10000+int(s[5:7])*100+int(s[8:10])>20190430:
  print('TBD')
else:
  print('Heisei')

Solution (Python):
ymd = tuple(map(int, input().split('/')))

if ymd <= (2019, 4, 30):
    print('Heisei')
else:
    print('TBD')

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

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

Solution (Python):
print(["Heisei","TBD"][int(input()[5:7])>4])

Solution (Python):
S=input()
ans="TBD"

if int(S[0:4])<2019 or (int(S[0:4])==2019 and int(S[5:7])<=4):
    ans="Heisei"

print(ans)

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

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

Solution (Python):
a,b,c = input().split("/")
A = a + b + c
if A <= "20190430" :
    print("Heisei")
else :
    print("TBD")

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

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

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

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

Solution (Python):
def ABC_119_A():
    S = input()

    toshi = S[0]+S[1]+S[2]+S[3]
    tuki = S[5]+S[6]
    hi = S[8]+S[9]

    if (int(toshi) <= 2019) and (int(tuki) <= 4) and (int(hi) <= 30):
        print('Heisei')
    else:
        print('TBD')

if __name__ == '__main__':

    ABC_119_A()