import Control.Applicative
import Control.Monad
import qualified Data.ByteString.Char8 as B
import Data.Maybe (fromJust)
import Text.Printf
import Debug.Trace

main = do
  [a,b] <- words <$> getLine
  putStrLn $ if a == "H" then b
             else if b == "H" then "D"
                  else "H"
