s=input().split()



if s[0]==s[1]:

  print('H')

else:

  print('D')
a,b = input().split()

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

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

-s = input().split() -if s[0] == s[1]: -    print("H") -else: -    print("D") +a, b = input().split() +print(("H" if a == b else "D"))