100 atcoder#ABC056A. [ABC056A] HonestOrDishonest
[ABC056A] HonestOrDishonest
Score : 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 and as the input. Each of them is either H
or D
, and carries the following information:
If =H
, AtCoDeer is honest; if =D
, AtCoDeer is dishonest.
If =H
, AtCoDeer is saying that TopCoDeer is honest; if =D
, AtCoDeer is saying that TopCoDeer is dishonest.
Given this information, determine whether TopCoDeer is honest.
Constraints
- =
H
or =D
. - =
H
or =D
.
Input
The input is given from Standard Input in the following format:
Output
If TopCoDeer is honest, print H
. If he is dishonest, print D
.
H H
H
In this input, AtCoDeer is honest. Hence, as he says, TopCoDeer is honest.
D H
D
In this input, AtCoDeer is dishonest. Hence, contrary to what he says, TopCoDeer is dishonest.
D D
H