a, b = input().split()

if (a == "H") :

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

      print(b)

if (a == "D") :

   if (b == "H"):

      print ("D")

   if (b == "D"):

      print ("H")

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

if (a == "H") :

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

      print(b)

if (a == "D") :

   if (b == "H"):

      print ("D")

   if (b == "D"):

      print ("H")

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

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

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