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

Solution (Python):
import sys, os, math, bisect, itertools, collections, heapq, queue

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()

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

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

Solution (Python):
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')

Solution (Python):
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')

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

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

Solution (Python):
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")

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
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")

Solution (Python):
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")

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

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

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

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

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

Solution (Python):
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')

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

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

Solution (Python):
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")

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

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

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

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

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

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

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

Solution (Python):
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")

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

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

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

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

Solution (Python):

lst = input().split()

a = lst[0]
b = lst[1]


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

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

Solution (Python):
print('DH'[len(set(input().split()))&1])

Solution (Python):
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")

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

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

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

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

Solution (Python):
a,_,b=input()
print("DH"[a==b])

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


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

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

Solution (Python):
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

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

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

if __name__ == '__main__':
    main()

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

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

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

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

def response_atcoder(b):
  if b == 'H':
    return True
  if b == 'D':
    return False

answer = response_atcoder(b)
if a == 'D':
  answer = not(answer)

if answer:
  print('H')
else:
  print('D')

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

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

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

Solution (Python):
def resolve():
  a,b = input().split()
  flag=True
  if a=="H":
      if b=="D":flag=False
  else:
      if b=="H":flag=False
  print("H" if flag else "D")

resolve()

Solution (Python):


a, b = map(str, 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')

Solution (Python):
def actual(a, b):
    if a == b:
        return 'H'

    return 'D'

a, b = input().split()
print(actual(a, b))

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

Solution (Python):
def main():
    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')
    elif a == 'D' and b == 'D':
        print('H')
main()

Solution (Python):
lst = [0 if x == 'H' else 1 for x in map(str,input().split())]
print('H' if sum(lst)%2 == 0 else 'D')

Solution (Python):
import sys

def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))

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



if __name__ == '__main__':
    main()

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

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

Solution (Python):
import sys
a,b = map(str,input().split())
if not a in ("H","D"):
    sys.exit()

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

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

Solution (Python):
a,b=input().split()
print("DH"[a==b])

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

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

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

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

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

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

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

Solution (Python):
i = input().split()
a = i[0]
b = i[1]
if a == b:
    if a == "H":
        print("H")
    else:
        print("H")
elif a == "D":
    if b == "H":
        print("D")
    else:
        print("H")
else:
    print("D")

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

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

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

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

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

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

Solution (Python):
print("HD"[len(set(input()))%2])

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

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

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

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

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

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

Solution (Python):
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')

Solution (Python):
s=input()

t=s.split(' ')

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

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

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

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

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

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

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

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

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

Solution (Python):
a,b=map(str,input().split());print('DH'[a==b::2])

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

Solution (Python):
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")

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

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

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


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

Solution (Python):
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')

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

x={'H':1,'D':-1}

if x[a]*x[b]==1:
  print('H')
else:
  print('D')

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

Solution (Python):
s = input().split()
a=s[0]
b=s[1]
if (a=='H')^(b=='H'):
    print('D')
else:
    print('H')

Solution (Python):
a,b = [str(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')

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

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

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

Solution (Python):
A, B = list(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")

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

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

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

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

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

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

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

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

Solution (Python):
a,b = input().strip().split()

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

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

Solution (Python):
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")

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

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

Solution (Python):

import sys
input = sys.stdin.readline









A,B = input().split()

d = {"H":0, "D":1}
Ans = ["H", "D"]

print(Ans[d[A]^d[B]])

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

Solution (Python):
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")

Solution (Python):
s = input()
d = {'H H': 'H', 'H D': 'D', 'D H': 'D', 'D D': 'H'}
print(d[s])

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

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

print(a)

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

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

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

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

Solution (Python):
def another(s):
  if s == 'D':
    return 'H'
  else:
    return 'D'

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

Solution (Python):
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")

Solution (Python):
ab=input()
if ab.count("D")==1:
    print("D")
else:
    print("H")

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

Solution (Python):
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')

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

Solution (Python):


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

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

Solution (Python):

a,b=input().split()

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

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

Solution (Python):
a, _, b = input()
print(['D', 'H'][a==b])

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
def resolve():
    a, b = input().split()

    ans = str()
    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)

resolve()

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

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

Solution (Python):


import sys






























def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    a, b = input().split()
    print('H') if a == b else print('D')


if __name__ == "__main__":
    main()

Solution (Python):
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")

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

Solution (Python):
A, B = map(str, input().split())
def Main(A, B):
    return 'H' if A == B else 'D'
    
print(Main(A, B))

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

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

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


if __name__ == '__main__':
    main()

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

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
def main():
  string = list(map(str,input().split()))
  if string[0]=='H':
    print(string[1])
  else:
    if string[1]=='H':
      print('D')
    else:
      print('H')

main()

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

Solution (Python):
A,B=input().split()
if A=="H":
   print(B)
else:
   if B == "H":
      print("D")
   else:
      print("H")

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

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

Solution (Python):
S = input().split()

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

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

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

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

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

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

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

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

print(ans)

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

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

print(ans)

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

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

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

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

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

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

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

Solution (Python):
def main():
    a, b = input().split()
    if a == "H" and b == "H":
        ans = 'H'
    elif a == 'D' and b == 'H':
        ans = 'D'
    elif a == "D" and b == "D":
        ans = "H"
    else:
        ans = "D"
    print(ans)


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):

"""
Created on Wed May 13 14:30:59 2020

@author: shinba
"""

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")

Solution (Python):
s = input()

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

Solution (Python):

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

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

Solution (Python):
import sys
import math
import bisect

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

if __name__ == "__main__":
    main()

Solution (Python):
a,b=input().split()
hatsugen=["H","D"]
idx=hatsugen.index(b)
if a=="H":
    print(hatsugen[idx])
else:
    print(hatsugen[1-idx])

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

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

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

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

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

Solution (Python):
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')

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

Solution (Python):
a, b = map(lambda c: c == "H", input().split())
print("D" if a ^ b else "H")

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

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

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

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

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

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

Solution (Python):

def ABC_56_A():
    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')

if __name__ == '__main__':

    ABC_56_A()

Solution (Python):
N = [str(e) for e in input().split()]
if(N[0] == 'H'):
  if(N[1] == 'H'):
    print('H')
  else:
    print('D')
else:
  if(N[1] == 'H'):
    print('D')
  else:
    print('H')

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

Solution (Python):
A, B= input().split()
if A==B:
    print('H')
else:
    print('D')

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log2
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a, b = MAP()

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

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

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

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

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

Solution (Python):
def main():
    a,b = (True if x=='H' else False for x in input().split())
    if (a and b) or (not a and not b): print('H')
    else: print('D')

if __name__ == '__main__':
    main()

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

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

Solution (Python):

a, b = input().split()

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

Solution (Python):
a,b=input().split();print(b if a=="H"else"HD"[a>b]if a==b else"D")

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

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

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

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

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