program main
  implicit none
  character(len=10) :: S
  integer :: y
  integer :: m
  integer :: d
  read(*,'(A)') S
  
  read(S(1:4),*) y
  read(S(6:7),*) m
  read(S(9:10),*) d
  
  if ( m >= 5 ) then
     write(*,*) 'TBD'
  else 
     write(*,*) 'Heisei'
  end if
  stop
end program main
