A - HonestOrDishonest 解説 /

実行時間制限: 2 sec / メモリ制限: 256 MB

配点 : 100

問題文

シカのAtCoDeerくんとTopCoDeerくんが「正直者か嘘つきか」ゲームをしています。 このゲームでは、正直者は常にほんとうのことを言い、嘘つきは常に嘘を言います。 文字 ab が入力として与えられます。これらはそれぞれ HD のどちらかです。

a=H のとき、AtCoDeerくんは正直者です。 a=D のとき、AtCoDeerくんは嘘つきです。 b=H のとき、AtCoDeerくんは「TopCoDeerくんは正直者だ」と発言しています。 b=D のとき、AtCoDeerくんは「TopCoDeerくんは嘘つきだ」と発言しています。

これらから判断して、TopCoDeerくんが正直者かどうか判定してください。

制約

  • a=H または D
  • b=H または D

入力

入力は以下の形式で標準入力から与えられる。

a b

出力

TopCoDeerくんが正直者なら H を、嘘つきなら D を出力せよ。


入力例 1

H H

出力例 1

H

AtCoDeerくんは正直者なので、AtCoDeerくんの言っているとおりTopCoDeerくんは正直者です。


入力例 2

D H

出力例 2

D

今度はAtCoDeerくんは嘘つきなので、AtCoDeerくんの言っていることとは異なりTopCoDeerくんは嘘つきです。


入力例 3

D D

出力例 3

H

Score : 100 points

Problem Statement

Two deer, AtCoDeer and TopCoDeer, are playing a game called Honest or Dishonest. In this game, an honest player always tells the truth, and an dishonest player always tell lies. You are given two characters a and b as the input. Each of them is either H or D, and carries the following information:

If a=H, AtCoDeer is honest; if a=D, AtCoDeer is dishonest. If b=H, AtCoDeer is saying that TopCoDeer is honest; if b=D, AtCoDeer is saying that TopCoDeer is dishonest.

Given this information, determine whether TopCoDeer is honest.

Constraints

  • a=H or a=D.
  • b=H or b=D.

Input

The input is given from Standard Input in the following format:

a b

Output

If TopCoDeer is honest, print H. If he is dishonest, print D.


Sample Input 1

H H

Sample Output 1

H

In this input, AtCoDeer is honest. Hence, as he says, TopCoDeer is honest.


Sample Input 2

D H

Sample Output 2

D

In this input, AtCoDeer is dishonest. Hence, contrary to what he says, TopCoDeer is dishonest.


Sample Input 3

D D

Sample Output 3

H