AtCoder Beginner Contest 056
A
HonestOrDishonest
AtCoder
⌀ 0
原题
←B →
翻译中…

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.

翻译中…

样例

Input #1
H H
Output #1
H
In this input, AtCoDeer is honest. Hence, as he says, TopCoDeer is honest.
Input #2
D H
Output #2
D
In this input, AtCoDeer is dishonest. Hence, contrary to what he says, TopCoDeer is dishonest.
Input #3
D D
Output #3
H
题目信息
题号
abc056_a
时间限制
2 s
内存限制
256 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。