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):
b=input()
print("TBD" if int(b[:4])>2019 or (int(b[:4])==2019 and int(b[5:7])>=5)else"Heisei")

Solution (Python):
y, m, d = map(int, input().split("/"))
hy, hm, hd = 2019, 4, 30


h = "Heisei"
t = "TBD"

if y < hy:
    print(h)
elif y > hy:
    print(t)
elif m < hm:
    print(h)
elif m > hm:
    print(t)
elif d < hd:
    print(h)
elif d > hd:
    print(t)
else:
    print(h)

Solution (Python):

S = input()
y = int(S[:4])
m = int(S[5:7])
d = int(S[8:10])
ans = False


def solve():
    if y != 2019:
        return y < 2019
    if m != 4:
        return m < 4
    if d != 30:
        return d < 30
    return True

print(['TBD', 'Heisei'][solve()])

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

Solution (Python):
s=input()
a=s[0:4]+s[5:7]+s[8:10]
a=int(a)






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

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

Solution (Python):
S = input()
year = int(S[0:4])
month = int(S[5:7])
day = int(S[8:10])
if year * 10000 + month * 100 + day <= 20190430:
    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")
else:
    print("TBD")

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

Solution (Python):
S = input()

month = int(S[5] + S[6])

day = int(S[-2] + S[-1])


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

Solution (Python):
A,B,C=(int(i) for i in input().split("/"))
if B>4:
    print("TBD")
elif B<=4:
    print("Heisei")

Solution (Python):
def main():
    S = input()
    month = int(S[5:7])
    day = int(S[8:])

    if month <= 4 and day <= 30:
        print('Heisei')
    else:
        print('TBD')


if __name__ == '__main__':
    main()

Solution (Python):
a, b, c = input().split("/")
tmp1, tmp2 = 0, 0
if b[0] == 0:
    tmp1 = int(b[1])
else:
    tmp1 = int(b)
if c[0] == 0:
    tmp2 = int(c[1])
else:
    tmp2 = int(c)
if tmp1 < 5 or tmp1 == 4 and tmp2 == 30 or tmp1 == 4 and tmp2 == 31:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
import datetime

s = [int(x) for x in input().split('/')]
s = datetime.datetime(s[0], s[1], s[2])

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

Solution (Python):
s = input()
s = s.split('/')
month = int(s[1])
day = int(s[2])

if month > 4:
    print('TBD')
else:
    print('Heisei')

Solution (Python):
import sys
from datetime import date


def solution(d):
    sp = d.split('/')
    result = date(int(sp[0]), int(sp[1]), int(sp[2]))
    if result <= date(2019, 4, 30):
        return "Heisei"
    else:
        return "TBD"

for i,line in enumerate(sys.stdin):
    if i == 0:
        print(solution(line))

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

if int(date[0]) < 2019:
    print("Heisei")
elif int(date[0]) ==  2019 and int(date[1]) < 4:
    print("Heisei")
elif int(date[0]) ==  2019 and int(date[1]) == 4 and int(date[2]) <= 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 m <= 4:
  print("Heisei")
else:
  print("TBD")

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

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

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

Solution (Python):
d1,d2,d3 = map(int, input().split('/'))


if d1< 2019 :
  print("Heisei")
elif d1 == 2019 :
  if d2 <= 4:
    print('Heisei')
  else :
    print('TBD')
else :
  print('TBD')

Solution (Python):
x = input()
yyyy, mm, dd = x.split("/")
if int(mm) <= 4:
  print("Heisei")
else:
  print("TBD")

Solution (Python):
import datetime

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

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

Solution (Python):
import sys
input = sys.stdin.readline
s=input()
month = s[5]+s[6]
day = s[8]+s[9]
if month[0] == '0':
    month = s[6]
if day[0] == '0':
    day = s[9]

if int(month) <= 4:
    print('Heisei')
else:
    print("TBD")

Solution (Python):
import datetime

s = input()

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

if inputDate > lastDate:
    print('TBD')
else:
    print('Heisei')

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

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

Solution (Python):
import datetime

a,b,c=map(int,input().split('/'))
d=datetime.date(2019,4,30)
f=datetime.date(a, b, c)
if d >= f:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
h,w ,s= map(int,input().split("/"))
if h>2019:
    print("TBD")
elif h == 2019 and w>4:
    print("TBD")
elif h == 2019 and w==4 and s == 30 :
    print("Heisei")
else:print("Heisei")

Solution (Python):

"""
Created on Sun Feb 24 21:03:10 2019

@author: Yamazaki Kenichi
"""

S = input()

mm = int(S[5:7])

if mm< 5:
    ans = 'Heisei'
else:
    ans ='TBD'
print(ans)

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

Solution (Python):
N = input().split('/')
year = int(N[0])
mon  = int(N[1])
day  = int(N[2])

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

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

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

if S[1] > 4 :
  print('TBD')
else:
  print('Heisei')

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

heisei = True
if y > 2019:
    heisei = False
elif y == 2019:
    if m > 4:
        heisei = False

if heisei:
    print('Heisei')
else:
    print('TBD')

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

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

if(int(num[1]) >= 5 ):
    print("TBD")
else:
    print("Heisei")

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

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

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

x = b+c
x = int(x)
if x > 430:
    print("TBD")
else:
    print("Heisei")

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

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

if int(Y) > 2019 or (int(Y) == 2019 and int(M) > 4):
    print('TBD')
else:
    print('Heisei')

Solution (Python):
"""
A - Still TBD
"""

from datetime import datetime as dt


def solve():
    target_day = dt.strptime(input(), '%Y/%m/%d')
    limit_day = dt(2019, 4, 30)
    if target_day > limit_day:
        print('TBD')
    else:
        print('Heisei')


if __name__ == '__main__':
    solve()

Solution (Python):
S = input()
ans = 'TBD'
if int(S[:4]) < 2019:
	ans = 'Heisei'
elif int(S[:4]) == 2019 and int(S[5:7]) < 4:
	ans = 'Heisei'
elif int(S[:4]) == 2019 and int(S[5:7]) == 4 and int(S[8:10]) <= 30:
	ans ='Heisei'
print(ans)

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

Solution (Python):
d = str(input())
y = int(d[0:4])
m = int(d[5:7])
d = int(d[8:])
if y <= 2018:
    print("Heisei")
    exit()
else:
    if y == 2019 and m <= 4 and d <= 30:
        print("Heisei")
        exit()
print("TBD")

Solution (Python):

s=input()

y=int(s[0:4])
m=int(s[5:7])
d=int(s[-2:])
ans=d+100*m+10000*y
if ans<=20190430:
    print("Heisei")
else:
    print("TBD")

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

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

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

Solution (Python):


s = 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')

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

Solution (Python):
import datetime
S=input()
form=datetime.datetime.strptime(S,"%Y/%m/%d")

if form>datetime.datetime.strptime('2019/04/30',"%Y/%m/%d"):
    print('TBD')
else:
    print('Heisei')

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

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

for i in range(len(s)):
	s[i] = int(s[i])

if s[0] >= 2019:
	if s[1] >= 5:
		print('TBD')
		exit()
	else:
		print('Heisei')
		exit()
else:
	print('Heisei')
	exit()

Solution (Python):
from sys import stdin

def fun():
    s = input()
    s2 = s.split("/")
    year = int(s2[0])
    month =int(s2[1])
    day = int(s2[2])

    if year < 2018:
        print("Heisei")
    elif month < 5:
        print("Heisei")
    else:
        print("TBD")


if __name__ == '__main__':
    fun()

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

Solution (Python):
import math
import numpy as np
import sys
def IL(): return list(map(int,sys.stdin.readline().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

s = S()

y = s[:4]
d = s[5:7]+s[8:]

f = 0
if int(y) < 2019:
    f = 1
elif int(y) == 2019:
    if int(d) <= 430:
        f = 1

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

Solution (Python):
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque, OrderedDict
from copy import deepcopy
from functools import lru_cache, reduce
from math import ceil, floor

import heapq
import itertools
import operator

import datetime


inf = float('inf')


def get_int():
    return int(input())


def get_str():
    return input().strip()


def get_list_of_int():
    return [int(i) for i in input().split()]


def get_char_list():
    return list(input().strip())



S = ""


def set_inputs():
    global S
    S = get_str()


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


if __name__ == '__main__':
    main()

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

if list(S[1][0]) == '0':
    S[1] = list(S[1][1])

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

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")
elif int(s[0:4]) == 2019 and int(s[5:7]) == 4 and int(s[8:10]) <= 30:
    print("Heisei")
else:
    print("TBD")

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

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

Solution (Python):
S = input()

s = int(S.replace("/",""))
a = 20190430
if s > a:
    print("TBD")
else:
    print("Heisei")

Solution (Python):
s = input()

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


if year < 2019:
	print("Heisei")
	quit()

if year >= 2020:
	print("TBD")
	quit()

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

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

Solution (Python):
def gengo(y, m):
        if y < 2019:
                return 'Heisei'
        elif y > 2019:
                return 'TBD'
        if m <= 4:
                return 'Heisei'
        return 'TBD'


y, m, _ = [int(v) for v in input().split('/')]
print(gengo(y, m))

Solution (Python):
import sys,collections,math;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

s = S().split("/")
ans = "TBD"
month = ["01","02","03","04"]
if s[1] in month:
    ans = "Heisei"
print(ans)

Solution (Python):
S=input()
a=int(S[0:4])
b=int(S[5:7])
c=int(S[8:])

if(a<2019):
    print("Heisei")
elif(a==2019 and b<4):
    print("Heisei")
elif(a==2019 and b==4 and c<31):
    print("Heisei")
else:
    print("TBD")

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

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

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

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

Solution (Python):



import datetime


s = input()
time_s = datetime.datetime.strptime(s, "%Y/%m/%d")


if time_s <= datetime.datetime(2019, 4, 30, 23, 59, 59):
    ans = "Heisei"
else:
    ans = "TBD"


print(ans)

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

Solution (Python):
S = input()
l = S.split("/")
if int(l[0]) >= 2020:
    print("TBD")
elif int(l[0]) <= 2018:
    print("Heisei")
else:
    if int(l[1]) >= 5:
        print("TBD")
    elif int(l[1]) <= 3:
        print("Heisei")
    else:
        if int(l[2]) >= 31:
            print("TBD")
        else:
            print("Heisei")

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

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

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

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

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

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

Solution (Python):
S = input()

N = int(S[:4])
M=int(S[5:7])
D=int(S[8:10])


if(N==2019):
    if(M<=4):
        print("Heisei")
    else:
        print("TBD")
elif(N<2019):
    print("Heisei")
else:
    print("TBD")

Solution (Python):
ymd = input()
year = int(ymd[:4])
month = int(ymd[5:7])
day = int(ymd[8:10])

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

solve()

Solution (Python):

import sys
from datetime import datetime as dt

def solve(S: str):
    p = '%Y/%m/%d'
    base = dt.strptime('2019/04/30', p)
    sd = dt.strptime(S, p)
    print('Heisei' if sd <= base else '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):
import datetime

s = input()


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

if d >= datetime.datetime(2019, 5, 1):
  print("TBD")
else:
  print("Heisei")

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

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

Solution (Python):



from datetime import datetime

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

if __name__=='__main__':
  main()

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

Solution (Python):
from datetime import datetime as dt

th = dt.strptime('2019/4/30', '%Y/%m/%d')
i = dt.strptime(input(), '%Y/%m/%d')

if th >= i:
    print("Heisei")
else:
    print("TBD")

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

Solution (Python):
mojiretsu = str(input())
nen = mojiretsu[:4]
tsuki = mojiretsu[5:7]
hi = mojiretsu[8:]

if(int(nen+tsuki+hi)>20190430):
  print("TBD")
else:
  print("Heisei")

Solution (Python):



from collections import deque
import heapq
import math
import bisect


def main():
    y, m, d = map(int, input().split("/"))

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


if __name__ == '__main__':
    main()

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

if s[0]>2019:
    print('Heisei')

elif s[0]<2019:
    print('TBD')

else:
    if s[1]>4:
        print('TBD')
    else:
        print('Heisei')

Solution (Python):
S=input()
S1=int(S.split("/")[0])
S2=int(S.split("/")[1])
S3=int(S.split("/")[2])

if S1 < 2019:
    print("Heisei")
elif S1 > 2019:
    print("TBD")
elif S2 < 4:
    print("Heisei")
elif S2 > 4:
    print("TBD")
elif S3 <= 30:
    print("Heisei")
else:
    print("TBD")

Solution (Python):
import sys
input_lines = sys.stdin.readline()
y,m,d = input_lines.split("/")


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

Solution (Python):


import sys

line = input()
data = line.split('/')

if int(data[1]) < 4:
    print('Heisei')
    sys.exit(0)
elif 4 < int(data[1]):
    print('TBD')
    sys.exit(0)
if int(data[2]) <= 30:
    print('Heisei')
    sys.exit(0)
print('TBD')

Solution (Python):
date = input()
date_lst = date.rsplit("/")

if date_lst[0]=="2019":
  if int(date_lst[1])<5:
    print("Heisei")
  else:
    print("TBD")
else:
  print("TBD")

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

Solution (Python):

def main():
    year, month, day = map(int, input().strip().split('/'))

    if year < 2019:
        print('Heisei')
        return
    
    if year == 2019:
        if month < 4:
            print('Heisei')
            return
        elif month == 4 and day <= 30:
            print('Heisei')
            return

    print('TBD')
    return

if __name__ == '__main__':
    main()

Solution (Python):

y, m, d = map(int, input().split("/"))
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")

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

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

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

if time[0] < 2019:
    print('Heisei')
elif time[0] > 2019:
    print('TBD')
else:
    if time[1] < 4:
        print('Heisei')
    elif time[1] > 4:
        print('TBD')
    else:
        if time[2] <= 30:
            print('Heisei')
        else:
            print('TBD')

Solution (Python):
import collections

year, month, day = map(int, input().split("/"))
if year > 2019:
    print("TBD")
elif year < 2019:
    print("Heisei")
elif year == 2019:
    if month >= 5:
        print("TBD")
    else:
        print("Heisei")

Solution (Python):
s,t,u = input().split("/")
if int(t) in (1,2,3,4):
    print("Heisei")
else:
    print("TBD")

Solution (Python):
S = input()

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

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

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

year = int(year)
month = int(month)
day = int(day)
flg = 0
if year<=2019:
    if year == 2019:
        if month<=4 and day <=30:
            flg = 1
    else:
        flg = 1

else:
    pass

if flg==1:
    print("Heisei")
else:
    print("TBD")

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

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

Solution (Python):
print(["Heisei","TBD"][int(input().replace("/",""))>20190430])

Solution (Python):
def main():
    s = input()
    
    m = int(s[5]+s[6])
    d = int(s[8]+s[9])

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




if __name__ == '__main__':
    main()

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

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

Solution (Python):
import datetime

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

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

Solution (Python):
print('Heisei' if int(input()[-5:-3])<5 else 'TBD')

Solution (Python):
S = input()

a = list(map(int, S.split("/")))

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

Solution (Python):
a,b,c=map(int,input().split('/'))
count=0
if a<2019:
  pass
elif a>2019:
  count+=1
elif b>4:
  count+=1
elif b<4:
  pass
elif c>30:
  count+=1
else:
  pass
if count==0:
  print('Heisei')
else:
  print('TBD')

Solution (Python):
s=input()
if int(s[0:4])<2019:
    print('Heisei')
elif int(s[0:4])>2019:
    print('TBD')
else:
    if int(s[5:7])<=4:
        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[0]+s[1]+s[2]+s[3])
b = int(s[5]+s[6])
if a >= 2020:
  print("TBD")
elif a == 2019 and b >= 5:
  print("TBD")
else:
  print("Heisei")

Solution (Python):
s = input()

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

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

print("TBD")

Solution (Python):
import sys

def main():
  input = sys.stdin.readline
  S = str(input().strip())
  y, m, d = map(int, S.split('/'))
  
  if y < 2019:
    print('Heisei')
  elif m <= 4:
    print('Heisei')
  else:
    print('TBD')


if __name__ == '__main__':
  main()

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

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

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


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

Solution (Python):
s = input()

if int(s[:4]) > 2019:
    print("TBD")
    exit()
if int(s[:4]) < 2019:
    print("Heisei")

if int(s[5]) * 10 + int(s[6]) > 4:
    print("TBD")
    exit()
if int(s[5]) * 10 + int(s[6]) < 4:
    print("Heisei")
    exit()

if int(s[8]) * 10 + int(s[9]) > 30:
    print("TBD")
else:
    print("Heisei")

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

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

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

Solution (Python):

import datetime
s = str(input())

y = int(s[0:4])
m = int(s[5:7])
d = int(s[8:10])
date = datetime.date(y,m,d)
threshold_date = datetime.date(2019,4,30)
if date <= threshold_date:
    print('Heisei')
else:
    print('TBD')

Solution (Python):
s = input()
b = s.split("/")
a = []
for i in b:
    a.append(int(i))
if (a[0] * 10000 + a[1] * 100 + a[2] <= 20190430):
    print("Heisei")
else:
    print("TBD")

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

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

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

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

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

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

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

if int(s[0]) <= 2018:
    print("Heisei")
elif int(s[0]) >= 2020:
    print("TBD")
elif int(s[1]) <= 3:
    print("Heisei")
elif int(s[1]) >= 5:
    print("TBD")
elif int(s[2]) <= 30:
    print("Heisei")
else:
    print("TBD")

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

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

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

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

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

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

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

Solution (Python):
S = input()
y = int(S[:4])
m = int(S[5:7])
d = int(S[8:])
ans = "Heisei"
if y == 2019:
    if m == 4:
        if d > 30:
            ans = "TBD"
    elif m > 4:
        ans = "TBD"
elif y > 2019:
    ans = "TBD"

print(ans)

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

if int(li[0]) >= 2020:
    print("TBD")
if int(li[0]) <= 2018:
    print("Heisei")
if int(li[0]) == 2019:
    if int(li[1]) >= 5:
        print("TBD")
    if int(li[1]) <= 3:
        print("Heisei")
    if int(li[1]) == 4:
        print("Heisei")

Solution (Python):
x,y,z = map(int, input().split('/'))

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

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

Solution (Python):

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

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

Solution (Python):






s = str(input())





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

Solution (Python):
S = input().strip()

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

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

Solution (Python):
import datetime

def solve():
  Y, M, D = map(int, input().split('/'))
  border = datetime.date(2019, 4, 30)
  today = datetime.date(Y, M, D)
  return ('Heisei' if border >= today else 'TBD')

print(solve())

Solution (Python):
from datetime import datetime
x = datetime.strptime(input(), '%Y/%m/%d')
if x < datetime.strptime('2019/05/01', '%Y/%m/%d'):
    print("Heisei")
else:
    print("TBD")

Solution (Python):
s = raw_input()

nen = s[0:4]
tuki = s[5:7]
date = s[8:10]
nen = int(nen)
tuki = int(tuki)
date = int(date)


if nen <= 2019 and tuki <= 4 and date <= 30:
    print 'Heisei'
else:
    print 'TBD'

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

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


if __name__ == '__main__':
    main()

Solution (Python):
S =[int(i)for i in input().split("/")]
num = S[0]*(3000**2)+S[1]*3000 +S[2]

com =2019*(3000**2) +4*3000 +30
if num <= com:
    print("Heisei")
else:
    print("TBD")