a,b = input().split()



if a ==b:

  print('H')

else:

  print('D')
a,b = input().split()

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

  print('H')

else:

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

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

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