import qualified Data.ByteString.Char8 as BS
import Control.Monad
import Control.Monad.ST
import Data.List
import Data.Maybe (fromJust)

solve :: String -> String -> String
solve "H" b = b
solve "D" "H" = "D"
solve "D" "D" = "H"

main :: IO ()
main = do
    (a:b:_) <- map BS.unpack . BS.words <$> BS.getLine
    putStrLn $ solve a b