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:
# ABC 056 A - HonestOrDishonest
a,b =map(str,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:
#!/usr/bin/python3

""" HonestOrDishonest """

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

    honest = 0
    if a == 'D':
        honest += 1
    if b == 'D':
        honest += 1

    if  honest == 1:
        print('D')
    else:
        print('H')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b=map(str, 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:
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:
a, b = [ x for x in input().split() ]

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

print(ans)
print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def fun():
     print('ac')
     print('ac')
     print('ac')
     print('ac')
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 == "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,b = map(str,input().split())

if a == "H":
    result = True
else:
    result = False

if (result == True and b == "H") or (result == False and b == "D"):
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
print["D","H"][raw_input()in ["H H","D D"]]

Submission status: Accepted

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

if ab[0] == "H" and ab[1] == "H":
    print("H")
    
elif ab[0] == "H" and ab[1] == "D":
    print("D")
    
elif ab[0] == "D" and ab[1] == "H":
    print("D")
    
elif ab[0] == "D" and ab[1] == "D":
    print("H")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
Ind = {"H": 0, "D": 1}
Scr = ["H", "D"]
print(Scr[sum(map(lambda x: Ind[x], input().split())) % 2])

Submission status: Accepted

Solution code:
""" AtCoder """

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = input().split()
s = set(l)
if len(s) == 1:
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
a, b = input().rstrip().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 = [x for x in input().split()]
d = {'HH': 'H','HD': 'D','DH': 'D','DD': 'H',}
ab = a + b
print(d[ab])

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=input().replace(' ','')
print('H' if x=='HH' or x=='DD' else 'D')

Submission status: Accepted

Solution code:
str_a, str_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':
    print(b)
elif b == 'H':
    print('D')
else:
    print('H')

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":
  A = 1
else:
  A = -1
if B == "H":
  B = 1
else:
  B = -1

if A*B > 0:
  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 = [i for i in input().split()]
is_honest = True
if (a == 'H') :
	is_honest = True
else :
	is_honest = False

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

Submission status: Accepted

Solution code:
def s(x):
  if x=="H":
    return 1
  else:
    return -1
a,b=input().split()
a=s(a)
b=s(b)
if a*b>0:
  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:
a, b = input().split()
if a == 'H':
	print(b)
else:
	if b == 'H':
		print('D')
	elif b == 'D':
		print('H')

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b = [i for i in 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:
print('D' if len(set(input().split()))>1 else 'H')

Submission status: Accepted

Solution code:
from statistics import mean, median,variance,stdev
import sys
import math

x = input().split()
#y = input().split()
a = []
#for i in range(len(x)):
#   a.append(int(x[i]))

if x[0] == x[1]:print("H")
else : print("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:
a,b=list(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:
	print('H')
else:
	print('D')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*
a = input()
if a == 'H H' or a == 'D D':
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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:
# -*- coding: utf-8 -*-


def main():
    """Function."""
    a, b = map(str, input().split())

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


if __name__ == "__main__":
    main()

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()
l=['D','H']
if a=='H':
    print(b)
else:
    print(l[l.index(b)-1])

Submission status: Accepted

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

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 == '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')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input().strip().split(" ")

if(a[0]=="H"):
    print(a[1])
else:
    if(a[1]=="H"):
        print("D")
    else:
        print("H")

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(1000000)


# Debug output
def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))


# Binary converter
def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v


# Width First Search (+ Distance)
def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk


# Depth First Search (+Distance)
def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False

# --------------------------------------------

dp = None


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

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


main()

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

Submission status: Accepted

Solution code:
S = 'HD'
a, b = [S.index(c) for c in input().split()]
print(S[(a + b) % 2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
a,b = input().split()

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

if data[0] == 'H':
	if data[1] == 'H':
		print('H')
	else:
		print('D')
else:
	if data[1] == 'H':
		print('D')
	else:
		print('H')

Submission status: Accepted

Solution code:
a,b=input().split()
if ((a=='H')&(b=='H'))|((a=='D')&(b=='D')):
    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
if a * b == 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=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':
        if y == 'H':
                print('H')
        else:
                print('D')
else:
        if y == '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 = 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 = 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":
  if b == "H":
    tpc = True
  else:
    tpc = False
else:
  if b == "H":
    tpc = False
  else:
    tpc = True

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# cook your dish here
l = input().split()

if l[0] == 'H':
    if l[1] == 'H':
        print('H')
    else:
        print('D')
else:
    if l[1] == '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:
ab = ''.join(input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,D=1,2
print("H" if eval(input().replace(" ","+"))%2==0 else "D")

Submission status: Accepted

Solution code:
#coding: utf-8
a, b = [int(x) for x in input().replace("H", "1").replace("D", "0").split()]
print(["H", "D"][a^b])

Submission status: Accepted

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

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 = input().split()
print("H") if a==b 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();print(['D','H'][a==b])

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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 = (str(_) for _ in input().split())
print('H') if a == b else print('D')

Submission status: Accepted

Solution code:
i = input()
print(["D","H"][i[-1]=="D"] if i[0]=="D" else i[-1])

Submission status: Accepted

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

ans = 1

if a == "D":
    ans *= -1
if b == "D":
    ans *= -1

if ans == 1:
    print("H")
else:
    print("D")

Submission status: Accepted

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

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:
#56a
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':
    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 + b).count('D') % 2 == 0:
    print('H')
else:
    print('D')

Submission status: Accepted

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

ans = 1
if a == 'D':
    ans *= -1
if b == 'D':
    ans *= -1

if ans > 0:
    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:
#-*-coding:utf-8-*-

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

c_n = {"H":1, "D":-1}
print("H" if 0 < c_n[a] * c_n[b] else "D")

Submission status: Accepted

Solution code:
at,top = input().split()
print("H" if at == top else "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:
def func(x):
    return 'H' if x == 'D' else 'D' 

a, b = input().split()
print(b if a == 'H' else func(b))

Submission status: Accepted

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

Submission status: Accepted

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

if (a, b) == ('H', 'H'):
    print('H')
elif (a, b) == ('H', 'D'):
    print('D')
elif (a, b) == ('D', 'H'):
    print('D')
elif (a, b) == ('D', 'D'):
    print('H')
else:
    print('Something wrong.')

Submission status: Accepted

Solution code:

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

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


if __name__ == "__main__":
        main()

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:
#coding:utf-8
n=input().split()
if(n[0]==n[1]):
  print("H")
else:
  print("D")

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print("H" if len(set(input().split(" "))) == 1 else "D")

Submission status: Accepted

Solution code:
a, b = map(str, 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")