Problem:
 Score : 100 points    Problem Statement Two deer, AtCoDeer and TopCoDeer, are playing a game called Honest or Dishonest .
In this game, an honest player always tells the truth, and an dishonest player always tell lies.
You are given two characters a and b as the input. Each of them is either H or D , and carries the following information:  If a = H , AtCoDeer is honest; if a = D , AtCoDeer is dishonest.
If b = H , AtCoDeer is saying that TopCoDeer is honest; if b = D , AtCoDeer is saying that TopCoDeer is dishonest.  Given this information, determine whether TopCoDeer is honest.      Constraints  a = H or a = D .  b = H or b = D .         Input The input is given from Standard Input in the following format:  a  b       Output If TopCoDeer is honest, print H . If he is dishonest, print D .        Sample Input 1 H H      Sample Output 1 H  In this input, AtCoDeer is honest. Hence, as he says, TopCoDeer is honest.       Sample Input 2 D H      Sample Output 2 D  In this input, AtCoDeer is dishonest. Hence, contrary to what he says, TopCoDeer is dishonest.       Sample Input 3 D D      Sample Output 3 H

Solution (Python):
a, b = raw_input().strip().split(" ")

a = 1 if (a == "H") else -1
b = 1 if (b == "H") else -1
print "H" if (a * b == 1) else "D"

Solution (Python):
a, b = raw_input().split()

if (a == "H" and b == "H") or (a == "D" and b == "D"):
    print "H"
else:
    print "D"

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

Solution (Python):


atDeer, topDeer = raw_input().split()

if atDeer == "D":
    if topDeer == "H":
        topDeer = "D"
    else:
        topDeer = "H"

print(topDeer)

Solution (Python):
import numpy as np

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

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

Solution (Python):
arg = input().split(' ')
a = arg[0]
b = arg[1]

if a=='D':
    b = 'D' if b=='H' else 'H'
    
print(b)

Solution (Python):
lst = input().split(" ")
A =lst[0]
B =lst[1]
if A == "H" and B == "H":
	print("H")
elif A == "D" and B == "H":	
	print("D")
elif A == "D" and B == "D":		
	print("H")
elif A == "H" and B == "D":		
	print("D")

Solution (Python):
t = input()
if t == 'H H' or t == 'D D': print('H')
else: print('D')

Solution (Python):
a, b = map(str, input().split())

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

Solution (Python):

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

Solution (Python):



a, b = input().split()

if a is "H":
    print(b)
else:
    if b is "H":
        print("D")
    else:
        print("H")

Solution (Python):
def main():
    a, b = input().split()
    print('H' if a == b else 'D')

if __name__ == '__main__':
    main()

Solution (Python):
str = input().split(' ')
a = str[0]
b = str[1]

res = 'H'
if a != b:
  res = 'D'
else:
  res = 'H'

print(res)

Solution (Python):
from collections import defaultdict


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


if __name__ == '__main__':
    main()

Solution (Python):
a, b = input().split()
a = 0 if a == 'H' else 1
b = 0 if b == 'H' else 1
s = a ^ b

ans = 'H' if not s else 'D'

print(ans)

Solution (Python):
def isHonest(x):
    return x == 'H'
x,y = map(isHonest, input().split(' '))
print('H' if not (x^y) else 'D')

Solution (Python):

l=input().split()
if l[0]==l[1]:
    print("H")
else:
    print("D")

Solution (Python):


a, b = input().split()

if a == "H" and b == "H":
    print("H")
elif a == "D" and b == "H":
    print("D")
elif a == "H" and b == "D":
    print("D")
elif a == "D" and b == "D":
    print("H")

Solution (Python):
a,b = raw_input().split(" ")

if a == b:
	print "H"

else:
	print "D"

Solution (Python):
ab=(input())
a,b=ab.split()

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

elif a=="H" and b=="D":
    print("D")
    
elif a=="D" and b=="H":
    print("D")

elif a=="D" and b=="D":
    print("H")

Solution (Python):
import sys
import re
input = lambda:sys.stdin.readline()
import functools
@functools.lru_cache(maxsize = 10000)

def Main():
  a, b = input().split()
  if a == "H" and b == "H":
    print("H")
  elif a == "D" and b == "H":
    print("D")
  elif a == "D" and b == "D":
    print("H")
  else:
    print("D")
    
if __name__ == '__main__':
  Main()

Solution (Python):
itext = input()
itext_s = itext.strip().split()
isAtHonest = 'H' == itext_s[0]
isTopHonest = 'H' == itext_s[1]
ans = 'H' if isAtHonest == isTopHonest else 'D'
print(ans)

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

Solution (Python):
inpt = raw_input().split()

if inpt[0] == 'H':
	print inpt[1]
elif inpt[0] == 'D':
	if inpt[1] == 'H':
		print 'D'
	elif inpt[1] == 'D':
		print 'H'

Solution (Python):
a, b = raw_input().split()
if a == 'H':
    print b
elif b == 'H':
    print 'D'
else:
    print 'H'

Solution (Python):
x = raw_input()
if (x == "H H" or x == "D D"):
  print "H"
else:
  print "D"

Solution (Python):
a,b=input().split()
if (a=='H' and b=='H') or (a=='D' and b=='D'):
    print('H')
else:
    print('D')

Solution (Python):
a, b = list(map(str, input().split()))
hd = True if a == "H" else False
if hd: print(b)
else:
    print("H") if b == "D" else print("D")

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

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

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

Solution (Python):


a, b = input().split()

if a=='H':
	if b=='H':
		print('H')
	elif b=='D':
		print('D')
elif a=='D':
	if b=='H':
		print('D')
	elif b=='D':
		print('H')

Solution (Python):
a,b = map(str,input().split())
if a == 'H':
    if b == 'H':
        print('H')
    elif b == 'D':
        print('D')
elif a == 'D':
    if b == 'H':
        print('D')
    elif b == 'D':
        print('H')

Solution (Python):
a, b = [i for i in input().split()]

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

Solution (Python):
a,b = input().split()

if a=='H':
    print(b)
else:
    print('H' if b=='D' else 'D')

Solution (Python):
a,b=input().split();print('HD'[a!=b])

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

Solution (Python):
a=input()
if a[0] !=a[2]:
    print("D")
else:
    print("H")

Solution (Python):


def main():
    a, b = raw_input().split()
    if a is "D":
        if b is "H":
            print "D"
        elif b is "D":
            print "H"
    elif a is "H":
        if b is "H":
            print "H"
        elif b is "D":
            print "D"

if __name__ == '__main__':
    main()

Solution (Python):
def main():
    a,b = input().split()
    if a == 'H':
        print("HD"[b=='D'])
    else:
        print("HD"[b!='D'])
    
if __name__ == "__main__":
    main()

Solution (Python):
l = raw_input().split(" ")

if l[0]==l[1]:
    print "H"
else:
    print "D"

Solution (Python):
str = input().rstrip().split(" ")
a = str[0]
b = str[1]

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()



def main():
    a,b = LS()
    if a == b:
        return 'H'
    return 'D'

print(main())

Solution (Python):
import math

l = input().split()

if l[0] == 'H':
    if l[1] == 'H':
        result = 'H'
    else:
        result = 'D'
else:
    if l[1] == 'H':
        result = 'D'
    else:
        result = 'H'

print(result)

Solution (Python):
a, b = map(str, input().split())
if a == 'H':
    if b == 'H':
        print('H')
    else:
        print('D')
else:
    if b == 'H':
        print('D')
    else:
        print('H')

Solution (Python):


a,b=raw_input().split()
if a=='H' and b=='H':
 print 'H'
if a=='H' and b=='D':
 print 'D'
if a=='D' and b=='H':
 print 'D'
if a=='D' and b=='D':
 print 'H'

Solution (Python):
a, b = [True if c == 'H' else False for c in raw_input().strip().split()]
print 'D' if a ^ b else 'H'

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

Solution (Python):
print(['D','H'][len(set(input().split()))==1])

Solution (Python):
A, B = input().split()
a = -1 if A == 'H' else 1
b = -1 if B == 'H' else 1
ans = 'H' if a*b > 0 else 'D'
print(ans)

Solution (Python):
a, b = input().split()

if a == 'H':
    
    print(b)
else:
    if b == 'H':
        print('D')
    else:
        print('H')

Solution (Python):
a, b = raw_input().split()

if a == b:
    print "H"
else:
    print "D"

Solution (Python):
line = input()
honest = line.split(" ")
a = honest[0]
b = honest[1]
if a == "H":
    print(b)
else:
    if b == "H":
        print("D")
    else:
        print("H")

Solution (Python):

a = input().split()
if(a[0] == 'H'):
    if(a[1] == 'H'):
        print("H")
    if(a[1] == 'D'):
        print("D")
if(a[0] == 'D'):
    if(a[1] == 'H'):
        print("D")
    if(a[1] == 'D'):
        print('H')

Solution (Python):


def main():
    a, b = input().split()

    if a == 'H':
        print(b)
    elif b == 'H':
        print('D')
    elif b == 'D':
        print('H')
    else:
        pass


if __name__ == '__main__':
    main()

Solution (Python):
a, b = map(ord, input().split())
if a^b:
    print('D')
else:
    print('H')

Solution (Python):
l_vec = input().split()
def classifier1(l) :
    if ((l[0] == 'H') and (l[1] == 'H')) or ((l[0] == 'D') and (l[1] == 'D')) :
        return 'H'
    else :
        return 'D'
print(classifier1(l_vec))

Solution (Python):
a, b = [(i) for i in input().split()]
if a == 'H':
    if b == 'H':
        print('H')
    else:
        print('D')
else:
    if b == 'H':
        print('D')
    else:
        print('H')

Solution (Python):
a, b = input().split()

if a == b: print('H')
else: print('D')

Solution (Python):
i = raw_input().split(" ")
print( "H" if ((i[0] == "H" and i[1] == "H") or (i[0] == "D" and i[1] == "D")) else "D")

Solution (Python):
a, b = input().split(" ")
s = {"H":"D", "D":"H"}

if a == 'H':
    print(b)
else:
    print(s.get(b))

Solution (Python):

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

a = True if a == 'H' else False
b = True if b == 'H' else False
if a == b:
    print("H")
else:
    print("D")

Solution (Python):
a, b = input().split()

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

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

Solution (Python):
a, b = raw_input().split()

if a == 'H':
	print b
else:
	if b == 'H':
		print 'D'
	else:
		print 'H'

Solution (Python):
a, b = map(str, raw_input().split())

if a == b:
    print 'H'
else:
    print 'D'

Solution (Python):


h= map(str, raw_input().split())
num = [0 if t == 'H' else 1 for t in h]
l = num[0] ^ num[1]

print 'H' if l == 0 else 'D'

Solution (Python):

a, b = (str(_) for _ in input().split())

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

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

Solution (Python):
l = input().split()
A=l[0]
B=l[1]

if A=='H' and B=='H':
    print('H')

elif A=='H'and B=='D':
    print('D')

elif A=='D' and B=='H':
    print('D')
else:
    print('H')

Solution (Python):
a, b = input().split()

if a == b:
 print('H')
else:
 print('D')

Solution (Python):

Inp = raw_input().split()
if Inp[0] == "H":
    if Inp[1] == "H":
        print("H")
    else:
        print("D")
else:
    if Inp[1] == "H":
        print("D")
    else:
        print("H")

Solution (Python):
a, b = raw_input().split()

if a == "H":
    print b
else:
    if b == "H":
        print "D"
    else:
        print "H"

Solution (Python):
a, b = input().split()

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

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

Solution (Python):
import sys

INF = 10**9+7

stdin = sys.stdin
def na(): return map(int, stdin.readline().split())
def nal(): return list(map(int, stdin.readline().split()))
def ns(): return stdin.readline().strip()
def nsl(): return list(stdin.readline().strip())
def ni(): return int(stdin.readline())

a, b = stdin.readline().strip().split(' ')

if(a == 'H'):
    print(b)
else:
    if(b == 'H'):
        print('D')
    else:
        print('H')

Solution (Python):
def main():
    a, b = map(str, input().split())

    if a == b:
        print('H')
    else:
        print('D')
main()

Solution (Python):
a, b = [0 if _ == 'H' else 1 for _ in input().split()]

res = ['H', 'D']

if a == 1:
    b = 1 - b

print(res[b])

Solution (Python):
a,b = map(lambda x:  x == 'H', input().split())
print('H' if ~(a^b)== -1 else 'D')

Solution (Python):


x,y=map(str,raw_input().split())  




if x =="H":
    print y
elif x =="D":
    if y=="D":
        print "H"
    elif y=="H":
        print "D"
elif x =="D":
    if y =="D":
        print"D"
    elif y =="H":
        print"H"

Solution (Python):


a, b = map(str, raw_input().split())
result = ''
if a == 'H':
    if b== 'H':
       	result = 'H'
    else:
	result = 'D'
else:
    if b=='H':
        result='D'
    else:
	result='H'


print result

Solution (Python):


a, b = map(str, raw_input().split())
result = ''
if a == 'H':
    if b== 'H':
       	result = 'H'
    else:
	result = 'D'
else:
    if b=='H':
        result='D'
    else:
	result='H'


print result

Solution (Python):
lines = input().split()
a = lines[0]
b = lines[1]
if a == "H" and b == "H":
    print("H") 
elif a == "H" and b == "D":
    print("D")
elif a == "D" and b == "H":
    print("D")
else:
    print("H")

Solution (Python):
a,b = raw_input().split()

if a=='H':
    if b=='H':
        r='H'
    else:   
        r='D'
else: 
    if b=='H':
        r='D'
    else:   
        r='H'
print(r)

Solution (Python):

ab = input()
if ab[0] == 'H':
    print(ab[2])
else:
    if ab[2] == 'H':
        print('D')
    else:
        print('H')

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

Solution (Python):
pp = input().strip().split(' ')
if pp[0] == 'H':
    print(pp[1])
elif pp[1] == 'H':
    print('D')
else:
    print('H')

Solution (Python):
input_lines = str(input())

a = input_lines.split(' ')[0]
b = input_lines.split(' ')[1]

if a == b:
    print('H')
else:
    print('D')

Solution (Python):
a,b=input().split()
if a=='H':
    aa=int(1)
else:
    aa=int(0)
if b=='H':
    bb=int(1)
else:
    bb=int(0)
if aa^bb==1:
    top = 'D'
else:
    top = 'H'

print(top)

Solution (Python):
if __name__ == '__main__':
    a, b = input().split()

    print('D' if (a == 'H') ^ (b == 'H') else 'H')

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

Solution (Python):
a,b=map(str,input().split())
print('H'if a==b else 'D ')

Solution (Python):
data = input().split()
a = data[0]
b = data[1]

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

Solution (Python):
import sys
import numpy as np

def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline

def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func()
    top_str = input_raw.strip().split()
    [a, b] = [top_str[0], top_str[1]]
    if a == 'H':
        TopCoDeer = b
    else:
        if b == 'H':
            TopCoDeer = 'D'
        else:
            TopCoDeer = 'H'
    print TopCoDeer

if __name__ == '__main__':
    main()

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


if __name__ == "__main__":
    main()

Solution (Python):
key = tuple(input().split())
table = {("H", "H"): "H", ("H", "D"): "D",
         ("D", "H"): "D", ("D", "D"): "H"}
print(table[key])

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

Solution (Python):


a, b = input().split()

H = True

if b == 'H':
    H = True
elif b == 'D':
    H = False

if a == 'D':
    H = not H

if H:
    print('H')
else:
    print('D')

Solution (Python):
a = input().split()
if a[0] == "H":
    if a[1] == "H":
        print("H")
    else:
        print("D")
else:
    if a[1] == "H":
        print("D")
    else:
        print("H")

Solution (Python):


a,b = raw_input().split()

if(a=='H'):
    if(b=='H'):
        print('H')
    else:
        print('D')
elif(a=='D'):
    if(b=='H'):
        print('D')
    else:
        print('H')

Solution (Python):
A,T=input().split()

if A=='H' :
    a=1
else:
    a=0

if T=='H' :
    t=1
else:
    t=0

if a+t!=1:
    print('H')
else:
    print('D')

Solution (Python):


a,b = input().split()
if a == "H":
	c = 1
else:
	c = -1

if b == "H":
	d = 1
else:
	d = -1
if c * d == 1:
	print("H")
else:
	print("D")

Solution (Python):
inputs = input().split()
a = inputs[0]
b = inputs[1]
if a == "H":
    if b == "H":
        print("H")
    else :
        print("D")
else :
    if b == "H":
        print("D")
    else :
        print("H")

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

Solution (Python):
a, b = input().strip().split()
if a == 'H':
	print(b)
elif a == 'D':
	if b == 'H':
		print('D')
	else:
		print('H')

Solution (Python):
a,b = map(str,input().split())
if a is 'H':
    print(b)
else:
    if b is'H':
        print('D')
    else:
        print('H')

Solution (Python):
a,b=map(str,input().split())
if a != b:
    print('D')
else:
    print('H')

Solution (Python):
def main():
    a, b = map(str, input().split())

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


if __name__ == "__main__":
    main()

Solution (Python):
a,b = map(str,input().split())
if a=="H" and b == "H":
    print("H")
elif a=="D" and b == "H":
    print("D")
elif a=="H" and b == "D":
    print("D")
elif a=="D" and b == "D":
    print("H")

Solution (Python):
line = raw_input().split(" ")
a = line[0]
b = line[1]

if a == "H":
    if b == "H":
        print "H"
    else:
        print "D"
else:
    if b == "H":
        print "D"
    else:
        print "H"

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