program main
implicit none
character(1) :: a,b
logical      :: t
  read(*,*) a,b
  t = a=='H'
  if(t)then
    t = b=='H'
  else
    t = .not.b=='H'
  endif
  if(t)then
    print*,'H'
  else
    print*,'D'
  endif
end program main
