{-# LANGUAGE ScopedTypeVariables, LambdaCase #-}

import qualified Data.List as List
import qualified Data.Set as Set

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