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

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



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

if a == b:

  print("H")

else:

  print("D")

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

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

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