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, b = input().split()

def notB(b):
    if b == 'H':
        return 'D'
    else:
        return 'H'

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

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 a == "H":
    print(b)
else:
    print("H" if b == "D" else "D")

Submission status: Accepted

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


abc()

Submission status: Accepted

Solution code:
a,b = map(str,input().split())
num = 0
if a == "D":
  num = num + 1
if b == "D":
  num = num + 1
if num%2 == 0:
  print("H")
else:
  print("D")

Submission status: Accepted

Solution code:
h,d=input().split()
if h==d:
  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:
a,b=input().split()

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

Submission status: Accepted

Solution code:

# -*- coding: utf-8 -*-

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 = list(input().split(" "))
if a==b:
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
A, B = [x for x in input().split()]
if A == 'H' and B == 'H': print('H')
if A == 'H' and B == 'D': print('D')
if A == 'D' and B == 'H': print('D')
if 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 = map(str, input().split())
print("H" if a==b else "D")

Submission status: Accepted

Solution code:
if [ v for v in input().split() ].count("H") == 1:
	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(' ')

if a == b:
    print('H')
else:
    print('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()
print('H' if a+b=='HH' or a+b=='DD' else 'D')

Submission status: Accepted

Solution code:
###template###
import sys
def input(): return sys.stdin.readline().rstrip()
def mi(): return map(int, input().split())
###template###

a, b = input().split()

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

Submission status: Accepted

Solution code:
A = [str(x) for x in input().split()]
a = []

for i in range(2):
    if A[i] == 'H':
        a.append(1)
    else:
        a.append(-1)

if a[0]*a[1] == 1:
    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:
at = list(input())
at_i = 0
top_i = 0
if at[0] =='H':
  at_i = 1

if at[0] == 'D':
  at_i = -1

if at[2] == 'H':
	top_i = 1

if at[2] == 'D':
  top_i = -1

if top_i * at_i == 1:
    print("H")
else :
    print("D")

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a,b = map(str,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 =  raw_input().split()
if a == "D" and b == "D":
    print "H"
elif a == "H" and b == "H":
    print "H"
else:
    print "D"

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:
# -*- coding: utf-8 -*-
"""
A - HonestOrDishonest
https://atcoder.jp/contests/abc056/tasks/abc056_a

"""
import sys


def solve(a, b):
    if a == 'H':
        return b
    return ['H', 'D'][b=='H']


def main(args):
    a, b = input().split()
    ans = solve(a, b)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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":
    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")
if a=="H" and b=="D" or 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 = input().split()
if b == 'H':
	print(a)
elif a == 'H':
	print('D')
else:
	print('H')

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math

mod = 10**9+7

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

if a == "H" and b == "H":
    tp = True
elif a=="D" and b == "H":
    tp = False
elif a=="D" and b=="D":
    tp = True
else:
    tp = False


if tp:
    print("H")
else:
    print("D")

Submission status: Accepted

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

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

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

else:
	print(b)

Submission status: Accepted

Solution code:
s=input();print('DH'[s[0]==s[2]])

Submission status: Accepted

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

if a.count("D")==1:
    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 = input().split()

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

Submission status: Accepted

Solution code:
a, b = input().split()
print('H' if a==b=='H' or a==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=='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 == "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:
b, c = input().split()
if((b=="H")^(c=="H")):
    print("D")
else:
    print("H")

Submission status: Accepted

Solution code:
s=input()
print("HD"[(s[0]=="D")^(s[2]=="D")])

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
from functools import partial, reduce
from operator import mul
prod = partial(reduce, mul)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()

fibo = [1, 1]
for i in range(2, 9):
    fibo.append(fibo[i - 1] + fibo[i - 2])

def main():
    a, b = LS()
    if a == 'H':
        ans = b
    else:
        if b == 'H':
            ans = 'D'
        else:
            ans = 'H'
    return ans

print(main())

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 = map(str, input().split())
if a+b == "HH" or a+b == "DD":
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
print(["H","D"][input().count("H")%2])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

a,b = inpl_str()
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(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 == "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=input();print(["H","D"][a[0]!=a[2]])

Submission status: Accepted

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

Submission status: Accepted

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

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()
fb = (b == 'H')
fa = fb if (a == 'H') else ~fb
print('DH'[fa])

Submission status: Accepted

Solution code:
a,b = map(str,input().rstrip().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 b == 'H':
    print(a)
else:
    if a == 'H':
        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:
a,b = list(map(str, input().split()))
if a==b:
	print('H')
else:
	print('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 == 'H':
    if b == 'H':
        ans = 'H'
    else:
        ans = 'D'
else:
    if b == 'H':
        ans = "D"
    else:
        ans = "H"

print(ans)

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 = list(input().split())
if a[0] != a[1]:
  print("D")
else:
  print("H")

Submission status: Accepted

Solution code:


def read_input():
    a, b = input().split()
    return a, b

def submit():
    a, b = read_input()

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


if __name__ == '__main__':
    submit()

Submission status: Accepted

Solution code:
a, b = input().split()
s = a + b
if s in ['HH', 'DD']:
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
import sys
a,b = list(input().split())
print("H" if a == b 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()
s = a + b
if s == 'HH' or s == 'DD':
  print('H')
else:
  print('D')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(lambda x:ord(x)-70,input().split())
print("H" if a*b>0 else "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":
    print(b)
else:
    print(["H", "D"] [b == "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 = input().split(" ")
if a == "D":
    if b == "H":
        a = "D"
    else:
        a = "H"
elif a == "H":
    if b == "D":
        a = "D"
    else:
        a = "H"

print(a)

Submission status: Accepted

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

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 == b:
    ans = 'H'
else:
    ans = 'D'
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
print('DH'[input()in'H HD 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 == "D":
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
# ABC056A - HonestOrDishonest
a, b = input().rstrip().split()
print('H' if a == b else 'D')

Submission status: Accepted

Solution code:
import functools

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


def inl():
    return list(map(int, input().split()))


def inlf():
    return list(map(float, input().split()))


def inls():
    return input().split()


def inpm(line):
    return [inp() for _ in range(line)]


def inpfm(line):
    return [inpf() for _ in range(line)]


def inpsm(line):
    return [inps() for _ in range(line)]


def inlm(line):
    return [inl() for _ in range(line)]


def inlfm(line):
    return [inlf() for _ in range(line)]


def inlsm(line):
    return [inls() for _ in range(line)]


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper


a, b = inls()

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

Submission status: Accepted

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

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')
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':
    print(b)
else:
    if b=='H':
        print('D')
    else:
        print('H')

Submission status: Accepted

Solution code:
a,b = [1 if x == 'H' else 0 for x in input().split()]

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

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

solve()

Submission status: Accepted

Solution code:
a, b = [item for item in 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(' ')
a = 1 if a == 'H' else 0
b = 1 if b == 'H' else 0
print('H' if a^b == 0 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 = map(str,input().split())
if a=='H' and b == 'H':
  print('H')
if a=='D' and b == 'H':
  print('D')
if a=='H' and b == 'D':
  print('D')
if a=='D' and b == 'D':
  print('H')

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 == 'H':
    print(b)
else:
    if b == 'D':
        print("H")
    else:
        print("D")

Submission status: Accepted

Solution code:
import sys

def main():
    input = sys.stdin.readline
    a, b = map(str, input().split())

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


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

Submission status: Accepted

Solution code:
s1,s2=map(str,input().split())
if s1==s2:
  print('H')
else:
  print('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 =="D" and b =="D":
  print("H")
elif a =="H" and b =="H":
  print("H")
else:
  print("D")

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # N! を求める
    # f = math.factorial(N)
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    # 1e10

    # 初期値用:十分小さい数(-100億)
    # -1e10
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    a,b = (_ for _ in input().split())
    if a == b:
        print('H')
    else:
        print('D')
if __name__ == '__main__':
    main()

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 == "D":
    print("H")
  else:
    print("D")

Submission status: Accepted

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

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 == b):
  print('H')
else:
  print('D')

Submission status: Accepted

Solution code:
a, b = input().split()
a = 1 if a == "H" else -1
b = 1 if b == "H" else -1
c = a*b
if c == 1:
    ans = "H"
else:
    ans = "D"
print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a, b = input().split()
print('H') if a == b 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' and b == 'H') or (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=="H"and b=="H")or(a=="D" and b=="D"):
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
def honest_or_dishonest(a: str, b: str)->str:
    return 'H' if a == b else 'D'


if __name__ == "__main__":
    a, b = input().split()
    ans = honest_or_dishonest(a, b)
    print(ans)

Submission status: Accepted

Solution code:
def INSTR():
	return input()

def INNUM():
	return int(INSTR())

def INSTR_S():
	return INSTR().split()

def INNUM_S():
	return map(int, INSTR_S())

def INSTR_SM(n):
	return [tuple(INSTR_S()) for _ in range(n)]

def INNUM_SM(n):
	return [tuple(INNUM_S()) for _ in range(n)]

A, B = INSTR_S()
print("H" if (A == "H" and B == "H") or (A == "D" and B == "D") else "D")

Submission status: Accepted

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

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 b=='H':
  if a=='H':
    print('H')
  else:
    print('D')
else:
  if a=='H':
    print('D')
  else:
    print('H')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

#A
a,b = LS()
if a == b:
    print("H")
else:
    print("D")
#B

#C
"""

x = I()
a = 0
i = 1
while a < x:
    a += i
    i += 1
print(i-1)
"""

#D
"""
n,k = LI()
a = LI(n)
"""
#E

#F

#G

#H

#I

#J

#K

#L

#M

#N

#O

#P

#Q

#R

#S

#T

Submission status: Accepted

Solution code:
s=input();print(['D','H'][s[0]==s[2]])

Submission status: Accepted

Solution code:
print("HD"[len(set(input().split()))-1::2])

Submission status: Accepted

Solution code:
s=str(input())
num=s.count('H')
if num==1:
    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:
# -*- coding: utf-8 -*-
ab = input().split()

if (ab.count('H') == 2) or (ab.count('D') == 2):
    print('H')
else:
    print('D')

Submission status: Accepted

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

Submission status: Accepted

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

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" 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] = input().split()
if a == b:
  print("H")
else:
  print("D")

Submission status: Accepted

Solution code:
print('DH'[len(set(input().split()))==1])

Submission status: Accepted

Solution code:
x,y=input().split()
print("DH"[(x==y)])

Submission status: Accepted

Solution code:
a,b = [x for x in 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 == 'HH' or a + b == 'DD':
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a, b = 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':
	answer = 'H'
if a == 'H' and b == 'D':
	answer = 'D'
if a == 'D' and b == 'H':
	answer = 'D'
if a == 'D' and b == 'D':
	answer = 'H'
print(answer)

Submission status: Accepted

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

aa = -1
bb = -1
if a == 'H':
    aa = 1
if b == 'H':
    bb = 1

if aa * bb == 1:
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
n=input().split()
print("H"if n[0]==n[1] else "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:
# coding: utf-8
a, b = map(str, input().split())
print('H' if a == b else 'D')

Submission status: Accepted

Solution code:
print("  HD"[len(set(input()))])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b = 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):
    print("H")
else:
    print("D")

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#56
a, b = 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(' '))
print('DXH'[('DXH'.find(a)-1)*('DXH'.find(b)-1)+1])

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 = (str(x) for x in input().split())
if a == "H":
    pass
elif b == "H":
    b = "D"
else:
    b = "H"

print(b)

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 = [True if e == "H" else False for e in input().split()]
if a and b:
    print("H")
elif not a and not b:
    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=="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 == b :
    print("H")
else:
    print("D")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = input().split()
if (a==b=='H') or (a==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 = input().split()
if (a[0]=='H') and (a[1]=='H'):
    print("H")
elif (a[0]=='H') and (a[1]=='D'):
    print("D")
elif (a[0]=='D') and (a[1]=='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:
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=='H':
    if b=='H':
        ans = 'H'
    else:
        ans = 'D'
else:
    if b=='H':
        ans = 'D'
    else:
        ans = 'H'
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
a, b = stdin.readline().rstrip().split()
if a == 'H':
  print(b)
else:
  if b == 'H':
    print('D')
  elif b == 'D':
    print('H')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,_,b=input()
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();print('H')if a==b else print('D')

Submission status: Accepted

Solution code:
# coding: utf-8
a, b = input().split()
print(['D', 'H'][a == b])

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=="D":
    print("H")
  else:
    print("D")