Problem2321--HonestOrDishonest

2321: HonestOrDishonest

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

Time Limit: 2 sec / Memory Limit: 256 MB

Score : 100100 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 aa and bb as the input. Each of them is either H or D, and carries the following information:
If aa=H, AtCoDeer is honest; if aa=D, AtCoDeer is dishonest. If bb=H, AtCoDeer is saying that TopCoDeer is honest; if bb=D, AtCoDeer is saying that TopCoDeer is dishonest.
Given this information, determine whether TopCoDeer is honest.

Constraints

  • aa=H or aa=D.
  • bb=H or bb=D.

Input

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

Output

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

Sample Input Copy

H H

Sample Output Copy

H

HINT

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

Source/Category