
program main
implicit none
integer :: yyyy, mm
character(len=10) :: yyyymmdd

read(*,'(a)',advance='no') yyyymmdd

read(yyyymmdd(1:4),*) yyyy
read(yyyymmdd(6:7),*) mm
if (yyyy.lt.2019) then
write(*,*) 'Heisei'
else if (mm .lt.5)then
write(*,*) 'Heisei'
else
write(*,*) 'TBD'
end if



end program main
