100560: [AtCoder]ABC056 A - HonestOrDishonest

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

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

Input

题意翻译

题目描述: AtcoDeer和TokadDeer在玩"正直的人或骗子"的游戏。在这个游戏中,正直的人总是说实话,骗子总是说谎。输入为两个字符串a和b,a和b均为"H"或"D"。 当a为H的时候,表明AtcoDeer是正直的人。当a为D的时候,表明AtcoDeer是个骗子。这时在b为H的时候,AtCODeer断定TokcoDeer是个正直的人,当b为D的时候,AtcoDeer断定TokcoDeer是骗子”。反之也成立。 你需要根据输入的两个字符串帮AtcoDeer断定TokadDeer是骗子还是正直的人,如果是正直的人,则输出"H",否则输出"D"。

加入题单

算法标签: