main :: IO ()
main = do
  [a,t] <- concat . words <$> getLine
  let (a',t') =(toBool a,toBool t)
  putStrLn $ [toHonest (if a' then t' else not t'), '\n']

toBool :: Char -> Bool
toBool 'H' = True
toBool 'D' = False
toBool _ = False

toHonest :: Bool -> Char
toHonest f = if f then 'H' else 'D'
