a, b = input().split()

if a == b :

  print("H")

else:

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

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

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

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