"use strict";
const main = (input) => {
  const str = input.trim();
  const str1 = str.replace(/H/g, "1");
  const str2 = str1.replace(/D/g, "-1");
  const [a, b] = str2.split(" ").map(Number);
  const result = a * b;
  if (result === 1) {
    return "H";
  } else {
    return "D";
  }
};

// ※この行以降は編集しない (標準入力から一度に読み込みMainを呼び出します)
console.log(main(require("fs").readFileSync("/dev/stdin", "utf8")));
