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") import math math def ip():return int(input()) ip def inp():return map(int,input().split()) inp def inpstr():return map(str,input().split()) inpstr def linp():return list(map(int,input().split())) linp def linpstr():return list(map(str,input().split())) linpstr s=input() s input() input k=s.find('/') k s.find('/') s.find s find '/' y=int(s[:k]) y int(s[:k]) int s[:k] s :k k s=s[k+1:] s s[k+1:] s k+1: k+1 k 1 k=s.find('/') k s.find('/') s.find s find '/' m=int(s[:k]) m int(s[:k]) int s[:k] s :k k d=int(s[k+1:]) d int(s[k+1:]) int s[k+1:] s k+1: k+1 k 1 if y<=2019 and m<=4 and d<=30:
    print("Heisei")
else:print("TBD") y<=2019 and m<=4 and d<=30 y<=2019 and m<=4 y<=2019 y 2019 m<=4 m 4 d<=30 d 30 print("Heisei") print "Heisei" def linpstr():return list(map(str,input().split())) def linpstr():return list(map(str,input().split())) linpstr def inp():return map(int,input().split()) def inp():return map(int,input().split()) inp def inpstr():return map(str,input().split()) def inpstr():return map(str,input().split()) inpstr k=s.find('/') s.find('/') k y=int(s[:k]) int(s[:k]) y s=s[k+1:] s[k+1:] s def linp():return list(map(int,input().split())) def linp():return list(map(int,input().split())) linp def ip():return int(input()) def ip():return int(input()) ip m=int(s[:k]) int(s[:k]) m s=input() input() s d=int(s[k+1:]) int(s[k+1:]) d k=s.find('/') s.find('/') k
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")
