PROGRAM ATCODER

implicit none
character(len=10) :: str
character(len=2) :: mm, dd
integer :: m, d

read(*,'(a)') str   !ここが入力欄

mm = str(6:7)
dd = str(9:10)

read(mm,*) m
read(dd,*) d

if (m < 4) then
	write(*,'(a)') 'Heisei'
    stop
end if

if(m == 4 .and. d <=30) then
	write(*,'(a)') 'Heisei'
    stop
end if

write(*,'(a)') 'TBD'

END PROGRAM ATCODER