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-----
2019/04/30

-----Sample Output-----
Heisei


Difficulty: introductory

Starter code:

Solutions:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    S = readline().strip()

    y, m, d = list(map(int, S.split('/')))
    if m <= 4:
        print('Heisei')
    elif m > 4:
        print('TBD')

    return


def __starting_point():
    main()

__starting_point()

from datetime import datetime

S = input()
heiei = datetime(2019, 4, 30)
date = datetime.strptime(S, '%Y/%m/%d')

if heiei >= date:
    print('Heisei')
else:
    print('TBD')

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

# import numpy as np
# import math

# from scipy.special import perm : perm(n, r, exact=True)
# from scipy.special import comb : comb(n, r, exact=True)

# import itertools
# for v in itertools.combinations(L, n):M.append(list(v))

# from numba import njit
# @njit('f8(i8,i8,i8,i8,f8[:,:,:])', cache=True)


""" Definitions  """

def lcm(a, b):
    return a*b//math.gcd(a, b)

MOD = 10**9+7

# ============================================================

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

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


list01 = input().split('/')
if int(list01[1]) <= 4:
    print('Heisei')
else:
    print('TBD')

import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    S = SS()

    y, m, d = S.split('/')
    n = int(y + m + d)

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

def __starting_point():
    resolve()

__starting_point()

S = input()

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

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

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

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

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

# ABC119
S = input()
if int(S[0:4]) > 2019:
    print('TBD')
    return
elif int(S[0:4]) == 2019:
    if int(S[5:7]) >= 5:
        print('TBD')
        return
print('Heisei')


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

s = input()
if int(s[5]) == 1:
  print("TBD")
elif int(s[6]) <= 4:
  print("Heisei")
else:
  print("TBD")

def mapt(fn, *args):
    return tuple(map(fn, *args))


def main():
    s = mapt(int, input().split("/"))
    print("Heisei" if s <= (2019, 4, 30) else "TBD")

main()

print(["Heisei","TBD"][input()[5:7]>"04"])

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


# split()をマスターせよ！
y, m, d = map(int, input().split('/'))
 
if m >= 5: print('TBD')
else: print('Heisei')

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

def readinput():
    s=input()
    return s

def main(s):
    y=int(s[:4])
    m=int(s[5:7])
    d=int(s[9:])
    if m<=4:
        return 'Heisei'
    else:
        return 'TBD'

def __starting_point():
    s=readinput()
    ans=main(s)
    print(ans)

__starting_point()

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

import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    S = readline().strip()

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

    return


def __starting_point():
    main()

__starting_point()

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

s = input()

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

s = input()
if s[5:7] == '04' or s[5:7] == '03' or s[5:7] == '02' or s[5:7] == '01':
    print('Heisei')
else:
    print('TBD')

S = input()

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

S = input()

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

a=input()
if int(a[5]+a[6])>4:
  print("TBD")
else:
  print("Heisei")

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

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

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

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

Y, M, D = input().split("/")

S = int(Y+M+D)

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

s=[int(i) for i in input().split("/")]
#print(s)

ans="TBD"

if s[0]<=2018:
    ans="Heisei"
    
elif s[0]==2019 and s[1]<=4:
    ans="Heisei"
    
print(ans)

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

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

a =input()

b = a[0:4]+a[5:7]+a[8:10]

if int(b) <=20190430:
    print("Heisei")

else:
    print("TBD")

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

s = "".join(input().split("/"))
print("Heisei" if s <= "20190430" else "TBD")

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

if(y < 2019):

    print('Heisei')

elif(y==2019):

    if(m < 5):
        print('Heisei')
    else:
        print('TBD')
    
else:
    
    print('TBD')

from datetime import datetime
S = input()
s = datetime.strptime(S, '%Y/%m/%d')
str_std = '2019/04/30'
std = datetime.strptime(str_std, '%Y/%m/%d')
if s <= std:
    print('Heisei')
else:
    print('TBD')

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

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

S=input()
m=int(S[5:7])
d=int(S[8:10])
if m<4:
  print('Heisei')
elif m==4:
  if d==31:
    print('TBD')
  else:
    print('Heisei')
else:
  print('TBD')

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

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

S=input()
l=S.split('/')
if int(l[0])<=2019:
    if int(l[1])<=4:
        if int(l[2])<=30:
            print('Heisei')
            return
    print('TBD')

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

date = input()
list_date = date.split('/')
if int(list_date[0]) <= 2018:
    print('Heisei')
elif int(list_date[0]) <= 2019 and int(list_date[1]) <= 4:
    print('Heisei')
else:
    print('TBD')


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

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

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

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

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


S = str(input())

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

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


a = input()

y = int(a[0:4])
m = int(a[5:7])

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

# n=int(input())
# a,b=map(int,input().split())
# l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]
s = input()

month = int(s[5:7])
if month < 4:
    ans = 'Heisei'
elif month == 4:
    day = int(s[8:])
    if day <= 30:
        ans = 'Heisei'
else:
    ans = 'TBD'
print(ans)


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

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

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

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

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


S = input()

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


# coding: utf-8
import math

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



S = list(input())
y = 1000*int(S[0])+100*int(S[1])+10*int(S[2])+int(S[3])
m = 10*int(S[5])+int(S[6])
d = 10*int(S[8])+int(S[9])

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


a,b,c = map (int, input ().split ('/'))
if a > 2019:
  print ('TBD')
else:
  if b*100+c > 430:
    print ('TBD')
  else:
    print ('Heisei')

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

s = [int(x) for x in input().split("/")]
 
if s[1] < 4:
  print("Heisei")
elif s[1] == 4 and s[2] <= 30:
  print("Heisei")
else:
  print("TBD")

import datetime

s=input()

s_date = datetime.datetime.strptime(s, '%Y/%m/%d')

last_date = '2019/05/01'

t_date = datetime.datetime.strptime(last_date, '%Y/%m/%d')

if s_date < t_date:
    print('Heisei')

else:
    print('TBD')

S = input()

# 辞書式の順序で比較
if S <= '2019/04/30': print('Heisei')
else: print('TBD')


S=input()

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

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

s = input()

year = int(s[:4])
mo = int(s[5:7])

if year < 2019:
  ans = "Heisei"
elif year == 2019 and mo<= 4:
  ans ='Heisei'
else:
  ans = 'TBD'
print(ans)

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

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

print(['TBD','Heisei'][int(input()[5:7])<5])

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

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


a = input()
if a < '2019/05/01':
  print('Heisei')
else:
  print('TBD')

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

s = input()

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

ans1 = 'Heisei'
ans2 = 'TBD'

S = input().split('/')
if int(S[0]) > 2019 or ( int(S[0]) == 2019 and int(S[1]) > 4):
  print(ans2)
else:
  print(ans1)

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

t=20190430
s=input()

if int(s.replace('/', '')) > t:
    print("TBD")
else:
    print("Heisei")

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

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

s=input()
s=int(s.replace("/",""))
print(["Heisei","TBD"][s>20190430])

from datetime import *

y1, m1, d1 = map(int, input().split('/'))

date1 = date(y1, m1, d1)
date2 = date(2019, 4, 30)

if date1 <= date2:
    print('Heisei')
else:
    print('TBD')

S=input()
print(["Heisei","TBD"][int(S[5:7]+S[8:10])>430])

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

S = str(input())

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

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

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

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

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


s=input()
if int(s[5]+s[6])>=5:
  print('TBD')
else:
  print('Heisei')

a = list(input().split("/"))
month = int(a[1])
date = int(a[2])
if month < 4:
    print("Heisei")
elif month == 4 and date <= 30:
    print("Heisei")
else:
    print("TBD")


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


S = input()
if int(S[5]) == 0 and int(S[6]) < 4:
    print('Heisei')
elif int(S[6]) == 4 and int(S[-2:-1]) <= 30:
    print('Heisei')
else:
    print('TBD')


y,m,d=map(int,input().split('/'))
if y < 2020 and m < 5:
    print('Heisei')
else:
    print('TBD')

S = input()
N = int(S[5]) * 10 + int(S[6])
print("Heisei" if N <= 4 else "TBD")

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

y, m, d = list(map(int, input().split("/")))
flg = True
if y >= 2020:
    flg = False
if y == 2019 and m >= 5:
    flg = False
print(("Heisei" if flg else "TBD"))


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

s = input()
s_i = s[0:4] + s[5:7] + s[-2:]

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