#abc056 A HonestOrDishonest

a,_,b=eval(input())

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

print(("DH"[a==b]))
# abc056 A HonestOrDishonest
a, _, b = eval(input())
print(("DH"[a == b]))

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

-# abc056 A HonestOrDishonest -a, _, b = eval(input()) +a, b = input().split()