a,b=input().split()

print(('DH'[a==b]))
a,b=input().split()

print((["D","H"][a==b]))
a, b = input().split()
print(("DH"[a == b]))

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

-print(("DH"[a == b])) +print((["D", "H"][a == b]))