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



Sample input:
H H


Sample output:
H

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

Solution code:
a,b=input().split()
x,y=0,0
if a=='H':
    x=1
if b=='D':
    y=1
j=x^y
print('H' if j else 'D')

Submission status: Accepted

Solution code:
print('__HD'[len(set(input()))])

Submission status: Accepted

Solution code:
[a,b]=[i for i in input().split()]
if a=="H":
    a=1
else:
    a=-1
if b=="H":
    b=1
else:
    b=-1

if a*b>0:
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
hd = {'H':1, 'D':-1}
rev = {1:'H', -1:'D'}
a,b=raw_input().split()
print rev[hd[a] * hd[b]]

Submission status: Accepted

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

Submission status: Accepted

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

if (a,b) in [("H","H"),("D","D")]:
    print("H")
else:
    print("D")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map((lambda x: True if x=='H' else False), input().split())
if not a:
  b = not b
print('H' if b else 'D')

Submission status: Accepted

Solution code:
a,b=map(str,input().split());print(["H","D"][((a=="H")+(b=="H"))%2])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if a =='H':
    print('{}'.format(b))
else:
    if b =='H':
        print('D')
    else :
        print('H')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print("H" if len(set(input()))==2 else "D")

Submission status: Accepted

Solution code:
c1, c2 = raw_input().split()
print 'H' if (c1 is c2) else 'D'

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

Solution code:
A,B = input().split()
print("H" if A==B else "D")

Submission status: Accepted

Solution code:
x,y=map(lambda x:x=="D",input().split())
print(["H","D"][x^y])

Submission status: Accepted

Solution code:
a, b = map(str,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")

Submission status: Accepted

Solution code:
A, B = input().split()
print("H" if A==B else "D")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B=map(str,input().split())
if A=='H' and B =='H':
    print ('H')
elif A=='H' and B=='D' or A=='D' and B =='H':
    print ('D')
else:
    print ('H')

Submission status: Accepted

Solution code:
ina,inb = input().split()
if ina==inb:
  print("H")
else:
  print("D")

Submission status: Accepted

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

sinri = 0

if a=="H":sinri+=1
if b=="H":sinri+=1

if sinri%2==0: print("H")
else: print("D")

Submission status: Accepted

Solution code:
a,b=input().split()
if a=="H":
  f=True
else:
  f=False
if f:
  print("H" if b=="H" else "D")
else:
  print("H" if b=="D" else "D")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = input().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')
else:
	print('H')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# AtCoder Beginner Contest
# Problem A

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import sys

def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()

a = arr_data[0][0]
b = arr_data[0][1]



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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = [s for s in input().split()]

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

Submission status: Accepted

Solution code:
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")
else:
    pass

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,d=map(str,input().split())
print("H" if h==d else "D")

Submission status: Accepted

Solution code:
a, b = map(str, input().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")
else:
  print("H")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = input().split()
a = l[0]
b = l[1]
flag = True
if (a=='H' and b=='H'):
    flag = True
if (a=='H' and b=='D'): 
    flag = False
if (a=='D' and b=='H'): 
    flag = False
if (a=='D' and b=='d'): 
    flag = True
print('H' if flag else 'D')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print("D"if(lambda x: x[0]^x[1])([int(s.replace("H","1").replace("D","0"))for s in input().split()])else"H")

Submission status: Accepted

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

    pattern = {
        ("H", "H"): "H",
        ("H", "D"): "D",
        ("D", "H"): "D",
        ("D", "D"): "H",
    }
    ans = pattern[(a, b)]
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b=map(str,input().split());print(['H','D'][a!=b])

Submission status: Accepted

Solution code:
import sys
a, b = sys.stdin.readline().split()

if a == 'H':
    first = 1
else:
    first = -1

if b == 'H':
    last = 1
else:
    last = -1

if first * last > 0:
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
print("XXHD"[len(set(input()))])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    a, b = input().split()
    f = 0
    if a == "H":
        f = 1
        if b == "D":
            f = 0
    else:
        if b == "D":
            f = 1
    
    if f == 0:
        print("D")
    else:
        print("H")



if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = map(str,input().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")
else:
    print("H")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ls = input().split()

if ls[0] == ls[1]:
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
def solve():
    a, b = list(map(str, input().split(" ")))

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


solve()

Submission status: Accepted

Solution code:
a, b = input().split()
if a =='H':
  a = True
else:
  a = False
if b == 'H':
  b = True
else:
  b = False

res = not a^b

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = [i for i in input().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')
else:
    print('H')

Submission status: Accepted

Solution code:
def read_str_list():
    return list(str(i) for i in input().split())
a,b = read_str_list()
if a == "H":
    print(b)
else:
    if b == "H":
        print("D")
    else:
        print("H")

Submission status: Accepted

Solution code:
A, B = input().split()

if A == B:
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
a, b = list(map(str, input().split()))
if (a == 'H' and b == 'H') or (a == 'D' and b == 'D'):
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

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

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a,b=[x for x in input().split()]
if (a=="H" and b=="D") or (a=="D" and b=="H"):
    print("D")
else:
    print("H")

Submission status: Accepted

Solution code:
def inint(): return int(input())
def inlint(): return list(map(int, input().split()))
def infloat(): return float(input())
def inlffloat(): return list(map(float, input().split()))
def inl(): return list(input())
def putlint(): return "".join(list(map(str, ans)))

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

Submission status: Accepted

Solution code:
A,B = input().split()
if A == B:
		print('H')
else: 
		print('D')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-



def main():
    A, B = input().split()

    assert A in ("H", "D")
    assert B in ("H", "D")

    if A == "H":
        print("H" if B == "H" else "D")
    elif A == "D":
        print("H" if B == "D" else "D")

if __name__ == "__main__": main()

Submission status: Accepted

Solution code:
input_line = raw_input().split(" ")
a = input_line[0]
b = input_line[1]
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"

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=input().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")

else:
    print("H")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
said = input().split()
if said[0] == 'H':
    if said[1] == 'H':
        print('H')
    else:
        print('D')
else:
    if said[1] == 'H':
        print('D')
    else:
        print('H')

Submission status: Accepted

Solution code:
from collections import defaultdict


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = list(input().split(" "))

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

Submission status: Accepted

Solution code:
l = input().split()
if(l[0] == 'H'):
    print(l[1])
elif(l[0] == 'D'):
    if(l[1] == 'H'):
        print("D")
    elif(l[1] == 'D'):
        print("H")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()
if s == "H H":
 print("H")
elif s == "D H":
 print("D")
elif s == "D D":
 print("H")
else:
 print("D")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A, B = map(str, input().split())

if A == B:
    print("H")
elif A != B:
    print("D")

Submission status: Accepted

Solution code:
MOD=1000000007

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

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
ar = raw_input().split(' ')
if ar[0] == ar[1] : ret = 'H'
else : ret = 'D'
print ret

Submission status: Accepted

Solution code:
def solve():
    a, b = map(str, input().split())
    if a == b:
        ans = "H"
    else:
        ans = "D"
    print(ans)

if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
chars = list(map(str, input().split()))
a = chars[0]
b = chars[1]

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

Submission status: Accepted

Solution code:
a, b = 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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
a, b = map(str, input().split())
if a == 'H':
    ac = 1
else:
    ac = -1
if b == 'H':
    tcd = 1
else:
    tcd = -1

if ac * tcd > 0:
    print ('H')
else:
    print ('D')

Submission status: Accepted

Solution code:
n = input()
tmp_n = n.split(" ")

a = tmp_n[0]
b = tmp_n[1]

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

Submission status: Accepted

Solution code:
#coding: shift_jis


a,b = map(str,raw_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'

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = raw_input().split()
print "H" if (a == "H" and b == "H") or (a == "D" and b == "D") else "D"

Submission status: Accepted

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

Submission status: Accepted

Solution code:
data = input().split()

if data[0] == 'D' :
    if data[1] == 'D' :
        data[1] = 'H'
    else :
        data[1] = 'D'
print(data[1])

Submission status: Accepted

Solution code:
a = map(str,raw_input().split())
#a = int(raw_input())

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
x = input().split()
a = x[0]
b = x[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')
elif a == 'D' and b == 'D':
    print('H')

Submission status: Accepted

Solution code:
inp = raw_input().split()

if inp[0] == 'H': print 'H' if inp[1] == 'H' else 'D'
else: print 'H' if inp[1] == 'D' else 'D'

Submission status: Accepted

Solution code:
a,b = input().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")
else:
  print("H")

Submission status: Accepted

Solution code:
import sys

a, b = (i for i in input().split(" "))

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

Submission status: Accepted

Solution code:
a,t=((i)for i in input().split())
if a==t:
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys
import os


a, b = input().split()

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

Submission status: Accepted

Solution code:
a,b = map(lambda x: x == 'H',input().split())
print('H') if not(a ^ b) else print('D')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main():
    line = sys.stdin.readline()
    a, b = line.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')

    return 0

if __name__ == '__main__':
    sys.exit(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A-HonestOrDishonest
# 問題URL:http://abc056.contest.atcoder.jp/tasks/abc056_a

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

Submission status: Accepted

Solution code:
x, y = map(str, input().split())

if (x == 'H' and y == 'H'):
    print('H')
elif (x == 'D' and y == 'H'):
    print('D')
elif (x == 'D' and y == 'D'):
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
a, b = [c for c in input().split()]
print("H" if a==b else "D")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
dic = {"H":1, "D":-1}
a, b = raw_input().split()
print "H" if dic[a]*dic[b] > 0 else "D"

Submission status: Accepted

Solution code:
l = raw_input().split()
if l[0] == l[1]:
    print 'H'
else:
    print 'D'

Submission status: Accepted

Solution code:
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"

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

atDeer, topDeer = raw_input().split()

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

print(topDeer)

Submission status: Accepted

Solution code:
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'

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a, b = input().split()
if a == 'H':
    print(b)
else:
    if b == 'H':
        print('D')
    else:
        print('H')

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

a, b = input().split()

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(res)

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
#!/usr/bin/env 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")

Submission status: Accepted

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

if a == b:
	print "H"

else:
	print "D"

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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'

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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