import Control.Applicative

main :: IO ()
main = do
    [a,b] <- words <$> getLine
    putStrLn $ solve a b
    
solve :: String -> String -> String 
solve a b = if a == "H" then b else if b == "H" then "D" else "H"