a, b = input().split()

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

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

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

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