program main
	implicit none
    character::a,b
    read(*,*) a,b
    if(a=='H' .and. b=='H')then
    	write(*,*)'H'
    else if(a=='H' .and. b=='D')then
    	write(*,*)'D'
    else if(a=='D' .and. b=='H')then
    	write(*,*)'D'
    else
    	write(*,*)'H'
    end if
    stop
end program main