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

if a=="H":

    print(b)

elif b == "H":

    print("D")

else:

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

if a==b: print("H")

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

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

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