Problem:


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



Sample input:
H H


Sample output:
H

Submission status: Accepted

Solution code:
# a=Hのときb=Hで正直者、a=Dの時b=Dで正直者

a, b = map(str, input().split())
if a == b:
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
s={'H':0,'D':1}
t=0
a=input().split()

for i in range(2):
  t+=s[a[i]]
  
if t%2!=0:
  print('D')
  
else:
  print('H')

Submission status: Accepted

Solution code:
a, b = input().split()

if a == 'H':
    print(b)
elif a == 'D':
    print('HD'[int(not 'HD'.index(b))])

Submission status: Accepted

Solution code:
a,b=map(str,input().split())
if a=="H" and b=="H":
  print("H")
elif a=="D" and b=="D":
  print("H")
else:
  print("D")

Submission status: Accepted

Solution code:
a, b = map(str, input().split())

if (a == b == 'H') or (a == b == 'D'):
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
# 入力
a, b = map(str,input().split())

# 処理
if a == b:
    TopCoDeer = 'H'
else:
    TopCoDeer = 'D'

# 出力
print(TopCoDeer)

Submission status: Accepted

Solution code:
# 文字列を取得
a,b = map(str,input().split())

# 条件に沿ったメッセージを出力
if a == b:
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
a,b = (input().split())

if (a == 'H' and b == 'H') or (a == 'D' and b == 'D'):
    print('H')

elif (a == 'H' and b == 'D') or (a == 'D' and b == 'H'):
    print('D')

Submission status: Accepted

Solution code:
# a atcooderkunの真偽  b atcooderkunの言動
# # b=H at「TOP本当」　b=D at「TOP嘘だ！
#    対応関係　〇　×
# 　　　　　　　×　〇

a, b = input().split()

if a==b:
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
# 入力
a,b = map(str, input().split())

# HHとDDはH、それ以外はD
if a == 'H' and b == 'H':
    print('H')
elif a == 'D' and b == 'D':
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
# 入力
a,b = map(str, input().split())

if a == 'H' and b == 'H':
    print('H')
elif a == 'D' and b == 'D':
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
a,b=map(str,input().split())
if a=="H":
  print(b)
  exit()
else:
  if b=="H":
    print("D")
  else:
    print("H")

Submission status: Accepted

Solution code:
a,b=input().split();print(['HD'.replace(b,''),b][a=='H'])

Submission status: Accepted

Solution code:
a,b=input().split();print([['H','D'][b=='H'],b][a=='H'])

Submission status: Accepted

Solution code:
a, b = map(str,input().split())

if a == "H" and b == "H" or a == "D" and b == "D":
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
a, b = map(str, input().split())

if a == 'H' and b == 'H' or a == 'D' and b == 'D':
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
# A - HonestOrDishonest

# a, bにそれぞれ文字'H','D'が入力されるので、'H'か'D'を判定し出力する


a, b = input().split()

if a == 'H':
    if b == 'H':
        print('H')
    elif b == 'D':
        print('D')
elif a == 'D':
    if b == 'H':
        print('D')
    elif b == 'D':
        print('H')

Submission status: Accepted

Solution code:
a, b = map(str, input().split())

if a == b:
    print("H")
elif a != b:
    print("D")

Submission status: Accepted

Solution code:
# 入力
a, b = input().split()

# 出力
# a = 'H' のときatくんは正直者
if a == 'H' and b == 'H':
    print('H')
elif a == 'D' and b == 'H':
    print('D')
elif a == 'H' and b =='D':
    print('D')
elif a == 'D' and b == 'D':
    print('H')

Submission status: Accepted

Solution code:
a,b = map(str,input().split())
if a == "H":
    print(b)
else:
    if b == "H":
        print("D")
    else:
        print("H")

Submission status: Accepted

Solution code:
# シカのAtCoDeerくんとTopCoDeerくんが「正直者か嘘つきか」ゲームをしています。
# このゲームでは、正直者は常にほんとうのことを言い、嘘つきは常に嘘を言います。
# 文字 a と b が入力として与えられます。
# これらはそれぞれ H か D のどちらかです。
# a=H のとき、AtCoDeerくんは正直者です。
# a=D のとき、AtCoDeerくんは嘘つきです。
# b=H のとき、AtCoDeerくんは「TopCoDeerくんは正直者だ」と発言しています。
# b=D のとき、AtCoDeerくんは「TopCoDeerくんは嘘つきだ」と発言しています。
#
# これらから判断して、TopCoDeerくんが正直者かどうか判定してください。

# 制約
# a='H' または 'D'
# b='H' または 'D'


# 標準入力から文字列 a と b を取得する
input_a, input_b = map(str,input().split())

reslut = "ret"

# TopCoDeerくんが正直者かどうか判定し、結果を出力する。
# ※ 正直者=="H"、嘘つき=="D"
if input_a == "H":  # AtCoDeerくんが正直者の場合
    if input_b == "H":
        result = "H"
    elif input_b == "D":
        result = "D"
elif input_a == "D":    # AtCoDeerくんが嘘つき者の場合（条件増えた時ようにelifにした）
    if input_b == "H":
        result = "D"
    elif input_b == "D":
        result = "H"
else:
    reslut = "I don't Know."

print(result)

Submission status: Accepted

Solution code:
#   AtCoder abc056 a
#   ストレッチ課題

#   入力
a, b = map(str, input().split())

if a == b:
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
#   AtCoder abc056 a
#   ストレッチ課題

#   入力
a, b = map(str, input().split())

#   判定
# if ((a == "H") and (b == "H")) or ((a == "D") and (b == "D")):
#     print("H")
# else:
#     print("D")
if a == b:
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
a, b = input().split()

if a == 'H' and b == 'H':
    print('H')
elif a == 'H' and b == 'D':
    print('D')
elif a == 'D' and b == 'H':
    print('D')
else:
    print('H')

Submission status: Accepted

Solution code:
S =input().replace("H","0")
S = S.replace('D','1')
S_list = list(map(int,S.split()))

if  S_list[0] ^ S_list[1] == 0 :
    result = "H"
else:
    result = "D"
print(result)

Submission status: Accepted

Solution code:
# 056a

# a=H, b=H TCD君は正直者
# a=H, b=D TCD君は嘘つき
# a=D, b=H TCD君は嘘つき
# a=D, b=D TCD君は正直者

a, b = map(str, input().split())

if a == 'H' and b == 'H':
    print('H')
elif a == 'H' and b == 'D':
    print('D')
elif a == 'D' and b == 'H':
    print('D')
else:
    print('H')

Submission status: Accepted

Solution code:
def solve():
    a, b = input().split()
    if a == 'H':
        print(b)
    else:
        if b == 'H':
            print('D')
        else:
            print('H')


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
a, b = map(str, input().split())

if a == 'H' and b == 'H':
    print('H')
elif a == 'H' and b == 'D':
    print('D')
elif a == 'D' and b == 'H':
    print('D')
elif a == 'D' and b == 'D':
    print('H')

Submission status: Accepted

Solution code:
a,b = input().split()
if a == "H" and b == "H":
  print("H")
elif a == "D" and b == "D":
  print("H")
else:
  print("D")

Submission status: Accepted

Solution code:
a,b=input().split()
if(a =='H' and b=='H') or (a =='D' and b=='D'):
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
a, b = map(str, input().split())

if a == 'H' and b == 'H':
    print('H')
elif a == 'D' and b == 'D':
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
a, b = input().split()
if a == b:
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
a,b=input().split()

if a=='H':
  print(b)
else:
  if b=='H':
    print('D')
  else:
    print('H')

Submission status: Accepted

Solution code:
a,b = input().split()

if a == 'H':
    if b == 'H':
        print('H')
    else:
        print('D')
else:
    if b == 'H':
        print('D')
    else:
        print('H')

Submission status: Accepted

Solution code:
a,b = input().split()

if (a=="H" and b=="H") or (a=="D" and b=="D"):
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
# AtCoDeerくんとTopCoDeerくんが何と言ってるかを a,bで入力
a,b = input().split()
# もしa=Hでb=HならTopCoDeerくんは正直者
if a == "H" and b == "H":
    print("H")
# もしa=Dでb=HならTopCoDeerくんは正直者
elif a == "D" and b == "D":
    print("H")
# それ以外はbは嘘つき
else:
    print("D")

Submission status: Accepted

Solution code:
# 入力
a, b = map(str, input().split())

# 処理&出力
if a == 'H' and b == 'H':
    print('H')
elif a == 'H' and b == 'D':
    print('D')
elif a == 'D' and b == 'H':
    print('D')
elif a == 'D' and b == 'D':
    print('H')

Submission status: Accepted

Solution code:
a,b=input().split()
if a == "H":
    if b == "H":
        print("H")
    else:
        print("D")
if a == "D":
    if b == "H":
        print("D")
    else:
        print("H")

Submission status: Accepted

Solution code:
a,b=input().split()
if a=="H":
  if b=="H":
    print("H")
  else:
    print("D")
else:
  if b=="D":
    print("H")
  else:
    print("D")

Submission status: Accepted

Solution code:
# A - HonestOrDishonest

# 正直者は常にほんとうのことを言い、嘘つきは常に嘘を言います

#  文字 a  と  b  が入力として与えられます。
#  これらはそれぞれ H か D のどちらかです

# すべて AtCoDeer君の発言
# a = H or D    私が H or D
# b = H or D    TopCoDeer 君が H or D

# TopCoDeer が　正直者なら H 嘘つきなら D を出力

# 文字列 a b を標準入力から得る
a, b = map(str, input().split())
# print(a, b)

# a ⇔ H の時、 b を代入
# そうでなく、 b ⇔ H の時、 D を代入
# 上記以外の場合、 H を代入

if a == "H":
    answer = b
elif b == "H":
    answer = "D"
else:
    answer = "H"

# 結果を出力
print(answer)

Submission status: Accepted

Solution code:
a, b = map(str, input().split())

if a == "H":
    print(b)
else:
    if b == "H":
        print('D')
    else:
        print('H')

Submission status: Accepted

Solution code:
a,b = map(str, input().split())

if a==b:
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
a, b = input().split()
if a == 'H':
    print(b)
elif a == 'D' and b == 'H':
    print('D')
else:
    print('H')

Submission status: Accepted

Solution code:
a, b = input().split()

if a == "H":
    if b == "H":
        print("H")
    else:
        print("D")
else:
    if b == "H":
        print("D")
    else:
        print("H")

Submission status: Accepted

Solution code:
a, b = map(str,input(). split())

if a == 'H' and b == 'H':
    print('H')
elif a == 'H' and b == 'D':
    print('D')
elif a == 'D' and b == 'H':
    print('D')
elif a == 'D' and b == 'D':
    print('H')

Submission status: Accepted

Solution code:
a, b = input().split()
if a == 'H':
    if b == 'H':
        print('H')
    else:
        print('D')
else:
    if b == 'H':
        print('D')
    else:
        print('H')

Submission status: Accepted

Solution code:
a,b=list(input().split())
if a==b:
  print('H')
else:
  print('D')

Submission status: Accepted

Solution code:
a, b = map(str, input().split())

if a == 'H' and b == 'H' or a == 'D' and b =='D':
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
a,b=input().split()
if a=="H" and b=="H":
  print("H")
elif a=="D" and b=="D":
  print("H")
else:
  print("D")

Submission status: Accepted

Solution code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    a, b = s_map()

    print('H' if a == b else 'D')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b = map(str, input().split())
if a == b:
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
a, b = map(str, input().split())
if a == b:
    print("H")
elif a != b:
    print("D")

Submission status: Accepted

Solution code:
res = {
  ('H', 'H'): 'H',
  ('H', 'D'): 'D',
  ('D', 'H'): 'D',
  ('D', 'D'): 'H'
}
print(res[tuple(input().split())])

Submission status: Accepted

Solution code:
a,b=map(str,input().split())
if a=="H":
    if b=="H":
        ans="H"
    elif b=="D":
        ans="D"
elif a=="D":
    if b=="H":
        ans="D"
    elif b=="D":
        ans="H"
print(ans)

Submission status: Accepted

Solution code:
atcodeer, topcodeer = map(str, input().split())

if atcodeer == 'H' and topcodeer == 'H':
    print('H')
elif atcodeer == 'H' and topcodeer == 'D':
    print('D')
elif atcodeer == 'D' and topcodeer == 'H':
    print('D')
elif atcodeer == 'D' and topcodeer == 'D':
    print('H')

Submission status: Accepted

Solution code:
a, b = map(str, input().split())

if a == 'H' and b == 'H':
    print('H')
elif a == 'H' and b == 'D':
    print('D')
elif a == 'D' and b == 'H':
    print('D')
else:
    print('H')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a, b = map(str, input().split())

if a == 'H':
    print(b)
else:
    if b == 'H':
        print('D')
    else:
        print('H')

Submission status: Accepted

Solution code:
a,b = raw_input().split()
h = {'H':'D', 'D':'H'} if a == 'D' else {'H':'H', 'D':'D'}
print h[b]

Submission status: Accepted

Solution code:
a,b = raw_input().split()
if a == 'H':
	print b
else:
	h = {'H':'D', 'D':'H'}
	print h[b]

Submission status: Accepted

Solution code:
a,b = input().split()
print(['D','H'][a==b])

Submission status: Accepted

Solution code:
a, b = map(str, input().split())
if a == 'H' and b == 'H':
  print('H')
elif a == 'D' and b == 'D':
  print('H')
else:
  print('D')

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def main():
    a, b = input().split()
    if a == b:
        print('H')
    else:
        print('D')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a, b = input().split()
if a == b:
  print("H")
else:
  print("D")

Submission status: Accepted

Solution code:
a, b = input().split()
if a == "H":
    print(b)
elif b == "D":
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
a, b = input().split()
if a == "H" and b == "H":
  print("H")
elif a == "D" and b == "H":
  print("D")
elif a == "H" and b == "D":
  print("D")
else:
  print("H")

Submission status: Accepted

Solution code:
s = input()
if s == "H H" or s == "D D":
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
a,b=input().split()
if a==b:
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
a,b=map(str,input().split())
if a=='H':
    if b=='H':
        print('H')
    else:
        print('D')
else:
    if b=='H':
        print('D')
    else:
        print('H')

Submission status: Accepted

Solution code:
a, b = input().split()
if a == 'H':
    print(b)
else:
    if b == 'H':
        print('D')
    else:
        print('H')

Submission status: Accepted

Solution code:
a,b=map(str,input().split())
if a=="H":
    if b=="H":
        print("H")
    else:
        print("D")
else:
    if b=="H":
        print("D")
    else:
        print("H")

Submission status: Accepted

Solution code:
a,b=input().split(" ")
if str(a) == str(b):
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
a,b = input().split()
if a=='H' and b=='H':
  print('H')
elif a=='H' and b=='D':
  print('D')
elif a=='D' and b=='H':
  print('D')
elif a=='D' and b=='D':
  print('H')

Submission status: Accepted

Solution code:
a,b = map(str,input().split())
if a == 'H':
    print(b)
else:
    if b == 'H':
        print('D')
    else:
        print('H')

Submission status: Accepted

Solution code:
a,b = input().split()
c = ['H','D']
c.remove(b)

if a =='H':
    print(b)
else:
    print(*c)

Submission status: Accepted

Solution code:
a, b = map(str, input().split())
if a == b:
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    a, b = input().split()
    if a == b:
        print('H')
    else:
        print('D')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b=input().split()
print(["D","H"][a==b])

Submission status: Accepted

Solution code:
a, b = input().split()

if a == 'H':
    print(b)
else:
    if b == 'H':
        print('D')
    else:
        print('H')

Submission status: Accepted

Solution code:
a,b = input().split()
if a =="H":
  print("H") if b =="H" else print("D")
else:
  print("D") if b =="H" else print("H")

Submission status: Accepted

Solution code:
a, b = input().split()

if a == 'H':
    print(b)
else:
    if b == 'H':
        print('D')
    else:
        print('H')

Submission status: Accepted

Solution code:
a,b=input().split()
if a=="H":
  if b=="H":
    print("H")
  else:
    print("D")
else:
  if b=="H":
    print("D")
  else:
    print("H")

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [list(input()) for _ in range(n)]


a,b = map(str, input().split())


if ((a=="H" and b =="H") or (a =="D" and b == "D")):
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
a, b= input().split()
if a == 'H':
    print('H') if b == 'H' else print('D')
else:
    print('H') if b == 'D' else print('D')

Submission status: Accepted

Solution code:
a,b=input().split()
print('DH'[a==b])

Submission status: Accepted

Solution code:
a,t = map(str, input().split())

print('H' if a==t else 'D')

Submission status: Accepted

Solution code:
a, b = input().split()
print("H" if (a == "H" and b == "H") or (a == "D" and b == "D") else "D")

Submission status: Accepted

Solution code:
a, b = input().split()

if a == b:
  ans = 'H'
else:
  ans = 'D'
  
print(ans)

Submission status: Accepted

Solution code:
s = input()

print("H" if s=="H H" or s=="D D" else "D")

Submission status: Accepted

Solution code:
a, b = list(map(str, input().split()))
if a == 'H' and b == 'H':
  print('H')
elif a == 'H' and b == 'D':
  print('D')
elif a == 'D' and b == 'H':
  print('D')
else:
  print('H')

Submission status: Accepted

Solution code:
a, b = map(str,input().split())
if a == 'H' and b == 'H':
    print('H')
elif a == 'H' and b == 'D':
    print('D')
elif a == 'D' and b == 'D':
    print('H')
elif a == 'D' and b == 'H':
    print('D')

Submission status: Accepted

Solution code:
a,b=input().split()
if a=="H":
    print(b)
else:
    if b=="H":
        print("D")
    else:
        print("H")

Submission status: Accepted

Solution code:
li=input().split()
if li==["H","H"] or li==["D","D"]:
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
a,b = input().split()
print('H' if a==b else 'D')

Submission status: Accepted

Solution code:
a,b=input().split()
if a=='H':
    if b=='H':
        print("H")
    elif b=='D':
        print("D")
elif a=='D':
    if b=='H':
        print("D")
    elif b=='D':
        print("H")

Submission status: Accepted

Solution code:
tmp = input().split(" ")
print("H") if tmp[0] == tmp[1] else print("D")

Submission status: Accepted

Solution code:
tmp = input().split(" ")
print("H") if tmp[0] == tmp[1] else print("D")

Submission status: Accepted

Solution code:
a,b = input().split()
if a == 'H' and b == 'H':
    print('H') 
elif a == 'D' and b == 'H':
    print('D') 
elif a == 'D' and b == 'D':
    print('H') 
elif a == 'H' and b == 'D':
    print('D')

Submission status: Accepted

Solution code:
a, b = [s == "H" for s in input().split()]
f = b if a else not b
print("H" if f else "D")

Submission status: Accepted

Solution code:
a,b = map(str,input().split())
if a == b:
	print("H")
else:
	print("D")

Submission status: Accepted

Solution code:
a, b = input().split()
if a == b:
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    """
    a = H|D atcodeer is honest/dishonest
    b = H|D atcodeer is saying topcodeer is honest/dishonest
    H H H
    D H D
    D D H
    H D D
    """
    l = input()
    return {
        'H H': 'H',
        'D H': 'D',
        'D D': 'H',
        'H D': 'D'
    }[l]


if __name__ == '__main__':
    print(solve())

Submission status: Accepted

Solution code:
a,b=input().split()
def ch(x):
  return 1 if x=="D" else -1
a=ch(a)
b=ch(b)
print("H" if a*b==1 else "D")

Submission status: Accepted

Solution code:
a, b = input().split()
if a == 'H':
    print(b)
elif a == 'D' and b == 'H':
    print('D')
elif a == 'D' and b == 'D':
    print('H')

Submission status: Accepted

Solution code:
a, b = input().split()

if a == 'H' and b == 'H':
  print('H')
elif a == 'D' and b == 'D':
  print('H')
else:
  print('D')

Submission status: Accepted

Solution code:
a,b=input().split()
print('H' if a==b else 'D' )

Submission status: Accepted

Solution code:
a, b = input().split()

if a == b:
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def main():

    a, b = map(str, input().split())

    if a == 'H':
        if b == 'H':
            ans = 'H'
        else:
            ans = 'D'

    else:
        if b == 'H':
            ans = 'D'
        else:
            ans = 'H'

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a,b = input().split()
if a == 'H' and b =='H':
    print('H')
elif a == 'D' and b =='D':
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
a,b=input().split()
x= (a=="H")
y=(b=="H")
if x and y or not x and not y:
  print("H")
else:
  print("D")

Submission status: Accepted

Solution code:
print({
	'H H': 'H',
  	'H D': 'D',
  	'D H': 'D',
  	'D D': 'H',
}[input()])

Submission status: Accepted

Solution code:
print('HD'[input()in'H D H'])

Submission status: Accepted

Solution code:
a,b=input().split()
d={"D":False,"H":True}
print("D" if d[a] ^ d[b] else "H")

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    a, b = readline().split()

    if a == b:
        print('H')
    else:
        print('D')

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b = input().split()
if (a=='H' and b=='H') or (a=='D' and b=='D'):
  print('H')
else:
  print('D')

Submission status: Accepted

Solution code:
a, b = input().split()

if b == 'H':
    if a == 'H':
        print('H')
    else:
        print('D')
elif b == 'D':
    if a == 'H':
        print('D')
    else:
        print('H')

Submission status: Accepted

Solution code:
a,b=input().split()
if(a==b):print("H")
else:print("D")

Submission status: Accepted

Solution code:
a,b =input().split()

d={'H':0, 'D':1}
print(['H','D'][d[a]^d[b]])

Submission status: Accepted

Solution code:
a = input().split()
print(a[1] if a[0] == 'H' else ('D' if a[1] == 'H' else 'H'))

Submission status: Accepted

Solution code:
a,b = input().split()

print('H' if a==b else 'D')

Submission status: Accepted

Solution code:
bi = {"H": False, "D": True}
a, b = input().split()
print("D" if bi[a] ^ bi[b] else "H")

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

a,b = S()
if a == b:
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
a,b=map(str,input().split())
if a == "H":
  print(b)
else:
  if b == "H":
    print("D")
  else:
    print("H")

Submission status: Accepted

Solution code:
a,b = map(str, input().split())
print("H") if a==b else print("D")

Submission status: Accepted

Solution code:
import sys
a, b = map(str, input().split())
if (a, b) == ('H', 'H'):
    print('H')
    sys.exit()
if (a, b) == ('D', 'D'):
    print('H')
    sys.exit()
else:
    print('D')

Submission status: Accepted

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    a, b = sl()
    if a == 'H':
        print(b)
    elif b == 'H':
        print('D')
    else:
        print('H')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b = input().split()
if a=='H':
  print(b)
else:
  if b=='H':
    print('D')
  else:
    print("H")

Submission status: Accepted

Solution code:
a,b = input().split()
print('H'if (a=='H' and b=='H') or (a=='D'and b=='D')else 'D')

Submission status: Accepted

Solution code:
a, b = map(str, input().split())
if a == 'H' and b == 'H':
    print('H')
elif a == 'H' and b == 'D':
    print('D')
elif a == 'D' and b == 'H':
    print('D')
elif a == 'D' and b == 'D':
    print('H')

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
l = LS()
if l[0] == l[1]:
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
a, b = input().split()

if a == b:
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
a,b=input().split()
if (a=="H")&(b=="H"):
    print("H")
elif (a=="D")&(b=="H"):
    print("D")
elif (a=="D")&(b=="D"):
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
a,b = input().split()

print("H" if (a == "D") ^ (b == "H") else "D")

Submission status: Accepted

Solution code:
a,b = input ().split ()
if a == 'H' and b == 'H':
  print ('H')
elif a == 'D' and b == 'D':
  print ('H')
else:
  print ('D')

Submission status: Accepted

Solution code:
a, b = map(lambda x:True if x=='H' else False, input().split())
if a ^ b:
    print('D')
else:
    print('H')

Submission status: Accepted

Solution code:
a, b = input().split()
if a == 'H':
  print(b)
else:
  if b == 'H':
    print('D')
  else:
    print('H')

Submission status: Accepted

Solution code:
a,b=map(str,input().split())
if a==b:
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
s = list(input().split(" "))
if s[0] == s[1]:print("H")
else: print("D")

Submission status: Accepted

Solution code:
a,b = input().split()

if a==b:
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
print('HD'[len(set(input()))-2])

Submission status: Accepted

Solution code:
a,b = input().split()
if (a == b): print('H')
else:print('D')

Submission status: Accepted

Solution code:
a, b = list(input().split())

if a == 'H':
    print(b)
elif a == 'D':
    if b == 'H':
        print('D')
    else:
        print('H')

Submission status: Accepted

Solution code:
a,b = map(str,input().split())
if a == "D" and b == "D":
    print("H")
elif a == "H" and b == "H":
    print("H")
elif a == "D" and b == "H":
    print("D")
else:
    print("D")

Submission status: Accepted

Solution code:
a,b = input().split()

if a == "H" and b == "H":
    print("H")
elif a == "D" and b == "H":
    print("D")
elif a == "H" and b == "D":
    print("D")
else:
    print("H")

Submission status: Accepted

Solution code:
a, b = map(str, input().split())
if a == 'H':
  print(b)
else:
  if b == 'H':
    print('D')
  else:
    print('H')

Submission status: Accepted

Solution code:
x,y=map(str,input().split())
if x == 'H':
    print(y)
elif x == 'D':
    print('H' if y=='D' else 'D')

Submission status: Accepted

Solution code:
A1, A2 = input().split()
if A1 == "H":
  print(A2)
else:
  if A2 == "H":
    print("D")
  else:
    print("H")

Submission status: Accepted

Solution code:
l=list(map(str,input().split()))

if (l[0]=='H' and l[1]=='H') or (l[0]=='D' and l[1]=='D'):
    print('H')

else:
    print('D')

Submission status: Accepted

Solution code:
a, b = list(map(str, input().split()))
print(b if a=='H' else ('H' if b=="D" else 'D'))

Submission status: Accepted

Solution code:
a, b = input().split()


if a == "H":
    print(b)
elif a == "D" and b == "D":
    print("H")
elif a == "D" and b == "H":
    print("D")

Submission status: Accepted

Solution code:
a,b=input().split()
if a=="H" and b=="H":
    print("H")
elif a=="D" and b=="D":
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
a,b=map(str,input().split())
if a=='H':
  print(b)
else:
  if b=='H':
    print('D')
  else:
    print('H')

Submission status: Accepted

Solution code:
a,b=input().split()
print('H' if a==b else 'D')

Submission status: Accepted

Solution code:
a,b = map(str,input().split())
d = {'H':'D','D':'H'}
if a=='H':
  print(b)
else:
  print(d[b])

Submission status: Accepted

Solution code:
a, b = input().split()
if a == 'H':
	print(b)
else:
	print("H" if b == 'D' else "D")

Submission status: Accepted

Solution code:
a,b = input().split()
if a == "H" and b =="H":
    print("H")
elif a == "H" and b =="D":
    print("D")
elif a == "D" and b =="H":
    print("D")
elif a == "D" and b =="D":
    print("H")

Submission status: Accepted

Solution code:
a,b = map(str, input().split())
if a == "H":print(b)
elif b == "H":print("D")
else : print("H")

Submission status: Accepted

Solution code:
a, b = map(str, input().split())
if (a == 'H' and b == 'H') or (a == 'D' and b == 'D'):
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
a,b = input().split()
if a==b: print("H")
else: print("D")