a,b = input().split()

if a=="H":

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

    else: print("D")

else:

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

    else: print("H")

a,b = input().split()

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

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

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

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