HonestOrDishonest

AtCoder
IDabc056_a
Time2000ms
Memory256MB
Difficulty
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$ [samples]
Samples
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
API Response (JSON)
{
  "problem": {
    "name": "HonestOrDishonest",
    "description": {
      "content": "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 ch",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc056_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "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 ch...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments