val = input().split()

print(("H" if val[0] == val[1] else "D"))

a,b=input().split()

if a==b=="H" or a==b=="D":

  print("H")

else:

  print("D")

val = input().split()
print(("H" if val[0] == val[1] else "D"))

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

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