open Printf
open Scanf

let solve a b =
  match (a, b) with
    "H", "H" -> "H"
  | "H", "D" -> "D"
  | "D", "H" -> "D"
  | _, _ -> "H"
           
let () =
  let a, b = scanf "%s %s\n" (fun x y -> (x, y)) in
  printf "%s\n" @@ solve a b
