implicit none

integer y,m
character s*10

read(5,'(a)') s
read(s(1:4),*) y
read(s(6:7),*) m



if(y.lt.2019) then
write(6,*) "Heisei"
else if(y.eq.2019 .and. m .le.4) then
write(6,*) "Heisei"
else
write(6,*) "TBD"
endif
 
end