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):
from __future__ import print_function
import numpy as np
import sys
import math,string,itertools,fractions,heapq,collections,re,array,bisect,copy,functools


import random

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)



a,b,c=map(int,input().split('/'))

if b>=5:
    print("TBD")
elif c>30:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
date = input()
tdate=[]
 
for s in date:
  tdate.append(s)
  
if tdate[5] != "0":
  mon = int(tdate[5] + tdate[6])
else:
  mon = int(tdate[6])


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

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

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

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

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

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

if ymd[0] <= 2019 and ymd[1] <= 4:
    print("Heisei")
else:
    print("TBD")

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

Solution (Python):
s = str(input())
y = int(s.split("/")[0])
m = int(s.split("/")[1])
d  = int(s.split("/")[2])

if y<=2018:
    print("Heisei")
elif y>=2020:
    print("TBD")
else:
    if m<=4:
        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("Heisei")
else:
    print("TBD")

Solution (Python):
S = input()

if S[5:7] in ['01', '02', '03', '04']:
    print('Heisei')
else:
    print('TBD')

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

Solution (Python):
from datetime import datetime

S = input()
T = datetime.strptime(S,'%Y/%m/%d')
P = '2019/04/30'
D = datetime.strptime(P,'%Y/%m/%d')

if T <= D:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
a = int(input().replace("/",""))
if a - 20190430 > 0:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
a=int(input().replace("/",""))
if a - 20190430 > 0:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
S = str(input())
s = 0
count = 0
for i in reversed(range(len(S))):
    if S[i] != "/":
        s += int(S[i]) * 10**(len(S)-i-count-1)
    else:
        count += 1
    
if s <= 20190430:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = input()

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

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

Solution (Python):
S = input()
m = int(S[5:7])

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

Solution (Python):
import functools

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


def inl():
    return list(map(int, input().split()))


def inlf():
    return list(map(float, input().split()))


def inls():
    return input().split()


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper

y, m, d = map(int, input().split('/'))
if m <= 4:
    print('Heisei')
else:
    print('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 datetime

S = datetime.date(*map(int, input().split('/')))
print("Heisei" if S <= datetime.date(2019, 4, 30) else "TBD")

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

y = ''
m = ''
d = ''
num = 0
tmp = ''
for index, s in enumerate(list(S)):
  if s == '/':
    if num == 0:
      y = tmp
    elif num == 1:
      m = tmp
    tmp = ''
    num += 1
  else:
    tmp += s
  if index == len(list(S)) - 1:
    d = tmp

if int(y + m + d) > 20190430:
  print("TBD")
else:
  print("Heisei")

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

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

Solution (Python):
input = input().split("/")
year = int(input[0])
month = int(input[1])

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

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

Solution (Python):

from sys import stdin
Y,M,D = map(int,stdin.readline().rstrip().split("/"))
print("TBD" if M >= 5 else "Heisei")

Solution (Python):

from sys import stdin
Y,M,D = map(int,stdin.readline().rstrip().split("/"))
if Y >= 2019 and  M >= 5:
    print("TBD")
else:
    print("Heisei")

Solution (Python):


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

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

s = int(a + b + c)


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

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

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

Solution (Python):
s=input()

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

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

if 20190430 >= match:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
s=input()

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

Solution (Python):
a, b, c = map(int, input().split("/"))

if int(a) >= 2020:
    print("TBD")
elif a == 2019 and  b >= 5:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
a=input().split("/")
r=','.join(a)
j=r.maketrans({',':''})
u=int(r.translate(j))
i=20190430
if u>i:
  print("TBD")
else:
  print("Heisei")

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

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

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

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

Solution (Python):
import sys
from itertools import product

import numpy as np

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


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


if __name__ == "__main__":
    print(solve())

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

if l[0]>2019 or (l[0]==2019 and l[1]>=5):
    print("TBD")
else:
    print("Heisei")

Solution (Python):
s=input()
year=int(s.split('/')[0])
month=int(s.split('/')[1])
day=int(s.split('/')[2])
if year<=2018:
    print('Heisei')
elif year==2019:
    if month<=4:
        print('Heisei')
    else:
        print('TBD')
else:
    print('TBD')

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

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

Solution (Python):

from datetime import datetime

input_date = datetime.strptime(input(), "%Y/%m/%d")
base_date = datetime(2019, 4, 30)

if input_date <= base_date:
    print("Heisei")
else:
    print("TBD")

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

Solution (Python):
d=list(map(int,input().split('/')))
ans='TBD'
if d[0]<2019:
    ans='Heisei'
elif d[1]<5:
    ans='Heisei'
print(ans)

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

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

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

Solution (Python):




TY, TM, TD = 2019, 4, 30

Y, M, D = map(int, raw_input().split('/'))

if M > 4:
    print '{}'.format('TBD')
else:
    print '{}'.format('Heisei')

Solution (Python):
S = input()

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

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

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

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

Solution (Python):
















S = input()

S = int(S[5:7])

if S <= 4:
    print('Heisei')
else:
    print('TBD')

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

Solution (Python):
print("Heisei" if int(input()[5:7]) <= 4 else "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):
li = list(map(int,input().split("/")))
if(li[1] <= 4):
    print("Heisei")
else:
    print("TBD")

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

y = int(y)

if int(m[0]) == 0:
    m = int(m[1])
else:
    m = int(m[0]+m[1])

if int(d[0]) == 0:
    d = int(d[1])
else:
    d = int(d[0]+d[1])
    
if y > 2019:
    print('TBD')
elif y == 2019:
    if m > 4:
        print('TBD')
    else:
        print('Heisei')
else:
    print('Heisei')

Solution (Python):
from datetime import datetime

S = input()

nowDate = datetime.strptime(S, '%Y/%m/%d')
lastDate =datetime.strptime('2019/04/30', '%Y/%m/%d')

if lastDate < nowDate:
	print("TBD")
else:
	print("Heisei")

Solution (Python):
print('Heisei' if input()<'2019/05/01' else 'TBD')

Solution (Python):
print('Heisei' if input()<'2019/05/01' else 'TBD')

Solution (Python):
Y,M,D = input().split("/")
hantei = True

if int(Y) <= 2019:
    if int(M) <= 4:
        if int(D) <= 30:
            print("Heisei")
            hantei = False

if hantei:
    print("TBD")

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

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

Solution (Python):
s=input()
month=int(s[5])*10+int(s[6])
if month<=4:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = input()
if S[5:7] in ["01","02","03","04"]:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S=input()
S=S.replace('/','')
S=list(S)
year=int(S[0]+S[1]+S[2]+S[3])
month=int(S[4]+S[5])
day=int(S[6]+S[7])
if year <= 2018:
  print('Heisei')
elif year >= 2020:
  print('TBD')
elif month <= 3:
  print('Heisei')
elif month >= 5:
  print('TBD')
else:
  print('Heisei')

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

if y < 2018 or (y == 2019 and m < 4) or (y == 2019 and 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 y == 2019:
  if m < 5:
    print('Heisei')
  elif m >= 5:
    print('TBD')
else:
  print('TBD')

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

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

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

Solution (Python):
from datetime import datetime

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

today = datetime(S[0], S[1], S[2])

if today <= datetime(2019,4,30):
    print("Heisei")
else:
    print("TBD")

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

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

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

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

def checker(y, m, d):
    if y < 2019: return 'Heisei'
    if y > 2019: return 'Heisei'
    if m  in [1, 2, 3, 4]: return 'Heisei'
    
    return 'TBD'

y, m, d = map(int, S.split('/'))
print(checker(y, m, d))

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

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

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

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

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

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

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

Solution (Python):
i = input()
x = [s.strip() for s in i.split('/')]
if int(x[0])<2019:
	print('Heisei')
elif int(x[0])==2019:
	if int(x[1])<5:
		print('Heisei')
	else:
		print('TBD')
else:
	print('TBD')

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

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

Solution (Python):
y,m,d=map(str,input().split('/'))
if int(m[0])==1:
  print('TBD')
elif int(m[1])>4:
  print('TBD')
else:
  print('Heisei')

Solution (Python):
from datetime import datetime as dt
date = input()
new_date = dt.strptime(date, '%Y/%m/%d')
if new_date <= dt(2019, 4, 30):
  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):
s = input()
ans = ""
y, m , d = map(int,s.split("/"))
if (y <= 2019) and (m <= 4):
  ans = "Heisei"
else: ans = 'TBD'
print (ans)

Solution (Python):
from datetime import datetime

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

if (input_date <= datetime(2019, 4, 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('Heisei')
else:
    print('TBD')

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

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

Solution (Python):
S = int(input().replace("/", ""))
print(["Heisei", "TBD"][not(S<=20190430)])

Solution (Python):


import sys
S = sys.stdin.readline().rstrip('\n')
if S <= '2019/04/30':
	print('Heisei')
else:
	print('TBD')

Solution (Python):
S=input()
Y=S[0:4]
M=S[5:7]
D=S[8:10]
YMD=int(Y+M+D)
if YMD<=20190430:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
S = input()
print('Heisei' if S <= '2019/04/30' else '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):
S = str(input())

listS = S.split('/')

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

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

s = s.split('/')
if int(s[0]) >= 2019:
    if int(s[1]) >= 5:
        if int(s[2]) >= 1:
            print('TBD')
            exit()

print('Heisei')

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

Solution (Python):
from sys import stdin

arr = list(map(int, stdin.readline().split('/')))
if arr[0] > 2019:
  print('TBD')
else:
  if arr[1] > 4:
    print('TBD')
  else:
    if arr[2] > 30:
      print('TBD')
    else:
      print('Heisei')

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("/"))
if  m >= 5 :
  print("TBD")
else:
  print("Heisei")

Solution (Python):
import datetime
 
d0 = datetime.date(2019, 4, 30)
d = datetime.date(*map(int, input().split('/')))
 
if d <= d0:
  print('Heisei')
else:
  print('TBD')

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

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

Solution (Python):
import datetime

S = input()

S_date = datetime.datetime.strptime(S, "%Y/%m/%d")
compare_date = datetime.datetime.strptime("2019/04/30", "%Y/%m/%d")

if S_date <= compare_date:
    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):
S = input()

if S[5] == '0' and int(S[6]) < 5:
    print('Heisei')
elif S[5] == '0' and int(S[6]) > 4:
    print('TBD')
elif S[5] == '1':
    print('TBD')

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

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

Solution (Python):


import re

S = input()
S = re.split("/",S)

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

Solution (Python):
s = input()
year, month = int(s[0:4]), int(s[5:7])


if year > 2019 or (year == 2019 and month > 4):
	print("TBD")
else:
	print("Heisei")

Solution (Python):
S = raw_input()
m = int(S[5]+S[6])
ans = 'Heisei'
if m > 4: ans = 'TBD'
print ans

Solution (Python):
y, m, d = tuple([int(e) for e in input().split('/')])

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

Solution (Python):

import sys


def solve(S: str):
    parsed = S.split("/")
    year = int(parsed[0])
    month = int(parsed[1])
    day = int(parsed[2])
    if year < 2018:
        print("Heisei")
    elif year >= 2020:
        print("TBD")
    else:
        if month <= 4:
            print("Heisei")
        elif month >= 5:
            print("TBD")
    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):
day = list(map(int, input().split("/")))

if day[0] <= 2019:
    if day[1] <= 4:
        if day[2] <= 30:
            print("Heisei")
            exit()
print("TBD")

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

Solution (Python):

import datetime

def main():
    S = str(input())
    tdatetime = datetime.datetime.strptime(S, '%Y/%m/%d')

    if tdatetime.month <= 4:
        print('Heisei')
    else:
        print('TBD')

if __name__ == "__main__":
    main()

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

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

Solution (Python):
s = input()

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

Solution (Python):
X=input()
A,B,C=(X.split('/'))
B=int(B)
C=int(C)

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

Solution (Python):
X = input()
A,B,C = (X.split('/'))
B = int(B)
C = int(C)

if B <= 4:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
S = input()

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


if year > 2019:
    print('TBD')
elif year == 2019:
    if month >= 5:
        print('TBD')
    else:
        print('Heisei')
else:
    print('Heisei')

Solution (Python):
s = input().split('/')
year = int(s[0]+s[1]+s[2])
print('Heisei' if year <= 20190430 else 'TBD')

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

Solution (Python):
import datetime

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

year = int(a[0])
month = int(a[1])
day = int(a[2])

kyou = datetime.datetime(year,month,day)

reiwa = datetime.datetime(2019,5,1)

if kyou < reiwa :
    print('Heisei')
else:
    print('TBD')

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

Solution (Python):
import re
pattern = r'([0-9]+)'

y, m, d = map(int, re.findall(pattern, input()))

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

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

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

Solution (Python):
a = input()
b = a.split("/")
c = [int(n) for n in b]

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

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

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

Solution (Python):
import datetime
S = input()
s = list(map(int, S.split(sep='/')))
dt = datetime.date(s[0], s[1], s[2])
dt_chk = datetime.date(2019, 4, 30)
print('Heisei' if dt <= dt_chk else 'TBD')

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

Solution (Python):
from datetime import datetime

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

Solution (Python):
s = input()

month = int(s[5:7])

print("Heisei" if month < 5 else "TBD")

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

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

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

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

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

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

Solution (Python):
S = input()

year = S[0:4]
month = S[5:7]
day = S[8:]

if int(year) >= 2019 and int(month) >= 5:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
S = input()

year = S[0:4]
month = S[5:7]
day = S[8:]

if int(year) >= 2019 and int(month) >= 5:
    print('TBD')
else:
    print('Heisei')

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

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

Solution (Python):
S = input()

month = S[5:7]


answer = 'Heisei'



if int(month)>4:
    answer = 'TBD'



print(answer)

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

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

Solution (Python):
S = [input(),"2019/04/30"]
if S == sorted(S):
  print("Heisei")
else:
  print("TBD")

Solution (Python):
from datetime import datetime

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

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

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

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

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

result = "TBD"
if y < 2019:
  result = "Heisei"
elif m < 5:
  result = "Heisei"

print(result)

Solution (Python):
def main():
	y, m, d = map(int, input().split("/"))
	if y > 2019:
		print("TBD")
		return
	if m > 4:
		print("TBD")
		return
	if d > 30:
		print("TBD")
		return
	print("Heisei")

if __name__ == '__main__':
    main()

Solution (Python):
tmp = list(map(int, input().split('/')))
y, m, d= tmp[0], tmp[1], tmp[2]

out = 'TBD'
if y < 2019:
  out = 'Heisei'
elif y == 2019:
  if m < 5:
    out = 'Heisei'

print(out)

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

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

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

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

Solution (Python):
Y,M,D = list(map(int,input().split("/")))
S = Y*10000+M*100+D
print("Heisei" if S <= 20190430 else "TBD")

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

Solution (Python):
d = input()
if int(d[:4]) > 2019:
    print('TBD')
elif int(d[:4]) == 2019:
    if int(d[5:7]) > 4:
        print('TBD')
    elif int(d[5:7]) == 4:
        if int(d[-2:]) > 30:
            print('TBD')
        else:
            print('Heisei')
    else:
        print('Heisei')
else:
    print('Heisei')

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):
date = input()

date = int(date.replace('/', ''))
if date <= 20190430:
    print("Heisei")
else:
    print("TBD")

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

Solution (Python):
import datetime

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

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

Solution (Python):

import sys

def main():
	S = input();

	yer = int(S[:4])
	mon = int(S[5:7])
	day = int(S[8:])

	if yer > 2019:
		print("TBD")
		sys.exit()
	if yer < 2019:
		print("Heisei")
		sys.exit()
	if mon > 4:
		print("TBD")
		sys.exit()
	if mon < 4:
		print("Heisei")
		sys.exit()
	if day <= 30:
		print("Heisei")
		sys.exit()
	print("TBD")

if __name__ == "__main__":
	main()

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

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

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

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

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

Solution (Python):
s = input()
sy = int(s[0:4])
sm = int(s[5:7])
sd = int(s[8:10])
if sy > 2019:
    print("TBD")
elif sy < 2019:
    print("Heisei")
else:
    if sm > 4:
        print("TBD")
    elif sm <= 4:
        print("Heisei")

Solution (Python):
s = input()

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

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

Solution (Python):
S = input()

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

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

Solution (Python):
a=input()
b="2019/04/30"
c=[a,b]
c.sort()
if c[0]==a:
  print("Heisei")
else:
  print("TBD")

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

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

Solution (Python):
import datetime
S = input()

dt = datetime.datetime.strptime(S, "%Y/%m/%d")
dt_end = datetime.datetime.strptime("2019/04/30", "%Y/%m/%d")
if dt > dt_end:
    print("TBD")
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):

"""
A - Still TBD
https://atcoder.jp/contests/abc119/tasks/abc119_a

"""
import sys


def main(args):
    S = input()
    yyyy, mm, dd = map(int, S.split('/'))
    if yyyy >= 2019 and mm >= 5:
        print('TBD')
    else:
        print('Heisei')

if __name__ == '__main__':
    main(sys.argv[1:])

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