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 = input().split()
table = [['H','D'],['D','H']]
ind = ['H','D']
print(table[ind.index(a)][ind.index(b)])

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':
  print('H' if b == 'H' else 'D')
elif a == 'D':
  print('D' if b == 'H' else 'H')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ab = input()
print(eval('"H" if {} ab[2] == "H" else "D"'.format("not" if ab[0] == "D" else "")))

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:
AB = str(input())
res = {"H H":"H","H D":"D","D H":"D","D D":"H"}
print(res[AB])

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':
  if b == 'H':
    print('H')
  else:
    print('D')
if a == 'D':
  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=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 = 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")or(a=="D"and b=="D"):
    print("H")
elif (a=="H" and b=="D") or (a=="D" and b=="H"):
    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=map(str,input().split())
if a=="H":
  print(b)
else:
  print(["H","D"][b=="H"])

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop

import collections

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")
elif a == "D":
    if b == "H":
        print("D")
    else :
        print("H")

Submission status: Accepted

Solution code:

def resolve():
    A, B = input().split()
    print("H" if (A=="H" and B=="H") or (A=="D" and B=="D") else "D")


if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7

a,b=input().rstrip().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 == 'D' else 'D')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = input().split()
print("H" if len(set(l)) == 1 else "D")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(str, input().split())
if a == "H":
    print(b)
elif a == "D":
    if b == "H":
        print("D")
    elif b == "D":
        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 = 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=[str(i) for i in input().split()]
if a==b:
  print('H')
else:
  print('D')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = list(input())

if s[0] == s[2]:
  print("H")
else:
  print("D")

Submission status: Accepted

Solution code:
def resolve():
	a, b = input().split()
	c = {
		'D': -1,
		'H': 1,
	}
	ans = c[a] * c[b]
	if ans > -1:
		print("H")
	else:
		print("D")
resolve()

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")
elif a == "D" and b == "D":
    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')

elif 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()
print("H" if a == "H" and b == "H" else "H" if a == "D" and b == "D" else "D")

Submission status: Accepted

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

resolve()

Submission status: Accepted

Solution code:
a,b=map(str,input().split())
strings="H","D"
if a==b:
    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 == 'H':
    ans = b
elif a == 'D':
    if b == 'H':
        ans = 'D'
    elif b == 'D':
        ans = 'H'

print(ans)

Submission status: Accepted

Solution code:
a,b=map(str,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")
elif a=="H" and b=="D":
    print("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 = map(str, input().split())
count = 0
if a == "D" and b == "H":
  count += 1
elif a == "H" and b == "D":
  count += 1
if count == 1:
  print("D")
else:
  print("H")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

else:
  print(b)

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()
ans = 'H' if a == b else 'D'
print(ans)

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 = map(str,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')
elif a == 'H' and b == 'D':
    print('D')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = input().split()
if a == 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:
icase=0
if icase==0:
    a,b=input().split()
    if a=="H":
        print(b)
    elif a=="D":
        if b=="H":
            print("D")
        elif b=="D":
            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")

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

Submission status: Accepted

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

    liar = False
    if  a == "H" and b == "H" :
        liar = False
    elif a == "H" and b == "D" :
        liar = True
    elif a == "D" and b == "H" :
        liar = True
    elif a == "D" and b == "D" :
        liar = False
    
    if liar:
        print("D")
    else:
        print("H")

main()

Submission status: Accepted

Solution code:
a,b=map(str,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':
    print(b)
else:
    print('D' if b == 'H' else 'H')

Submission status: Accepted

Solution code:
a,b=input().split()
print("H" if a==b=="H" or a==b=="D" 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=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=='D'):
    print('H')
elif (a=='D')and(b=='H'):
    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 = map(format, 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=map(str,input().split())
if a == b:
  print('H')
else:
  print('D')

Submission status: Accepted

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

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 = map(str, 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")
elif a == "H" and b == "D":
    print("D")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,_,m=input()
print("DH"[n==m])

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 == 'D' and b == 'D':
    print('H')
elif a == 'H' and b == 'D':
    print('D')

Submission status: Accepted

Solution code:
a, b = input().split()
if b == "H":
    b = "HD"
else:
    b = "DH"
print(b[0] if a == "H" else b[1])

Submission status: Accepted

Solution code:
N, M = input().split()
if N=='H':
    N=0
else:
    N=1
if M=='H':
    M=0
else:
    M=1

if N^M==0:
    ans = 'H'
else:
    ans = 'D'
print(ans)

Submission status: Accepted

Solution code:
print("DH"[input() in "D DH H"])

Submission status: Accepted

Solution code:
print(" HD"[eval(input().translate(str.maketrans("HD", "+-")).replace(" ","1*")+"1")])

Submission status: Accepted

Solution code:
a, b = input().split()
S = a+b
if (S == 'DD') or (S == 'HH'):
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
hd = input().split()
a, b = hd[0], hd[1]
if a == b:
    print('H')
else:
    print('D')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = 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":
  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:
# coding: utf-8

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 == 'H':
    print(b)
else:
    if b == 'H':
        print('D')
    else:
        print('H')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc056/tasks/abc056_a

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 - Honest or Dishonest
# 標準入力の取得
a,b = list(input().split())

# 全列挙
char_honest = "H"
char_dishonest = "D"
if a == char_honest:
    if b == char_honest:
        print(char_honest)
    else:
        print(char_dishonest)
else:
    if b == char_honest:
        print(char_dishonest)
    else:
        print(char_honest)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC056A
x = input().split()
a = (x[0])
b = (x[1])
if((a == "H") & (b == "H")):
    print("H")
elif ((a == "D") & (b == "D")):
    print("H")
else:
    print("D")

Submission status: Accepted

Solution code:
import sys

def convert(x):
    return 1 if x == 'H' else 0

a, b = sys.stdin.readline().split()
a = convert(a)
b = convert(b)

def main():
    ans = 'D' if a ^ b else 'H'
    print(ans)
    
if __name__ ==  '__main__':
    main()

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:
# ABC 056: A – HonestOrDishonest
a, b = 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' and b =='H') or (a=='D' and b =='D'):
    print('H')
else:
    print('D')

Submission status: Accepted

Solution code:
i_list = input().split()
a = i_list[0]
b = i_list[1]
r = ''
if a == 'H':
	r = b
else:
	r = 'H' if b == 'D' else 'D'
print(r)

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 == 'H':
    if b == 'H':
        print('H')
    else:
        print('D')
elif a == 'D':
    if  b == 'D':
        print('H')
    else:
        print('D')

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    a = [str(i) for i in input().split()]

    if a[0] == "H" and a[1] =="H":
        print("H")
    elif a[0] == "D" and a[1] =="H":
        print("D")
    elif a[0] == "D" and a[1] =="D":
        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()

result = ''
if(a == 'H' and b == 'H'):
  result = 'H'
elif(a == 'H' and b == 'D'):
  result = 'D'
elif(a == 'D' and b == 'H'):
  result = 'D'
elif(a == 'D' and b == 'D'):
  result = 'H'

print(result)

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 = map(str, raw_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 == "H": print(b)
else: print("H" if b == "D" else "D")

Submission status: Accepted

Solution code:
a,_,b=input();print('HD'[a!=b])

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 = 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':
    if b == 'H':
        print('H')
    else:
        print('D')
else:
    if 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:
import math



a,b=input().split()

print("H" if a==b else "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 = 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(b)
else:
    if b == "H": print("D")
    else: print("H")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import os

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    a, b = list(map(str, sys.stdin.buffer.readline().decode().split()))
    print('H' if a == 'H' and b == 'H' or a == 'D' and b == 'D' else 'D')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if a!=b:
    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:
a,b=raw_input().split()
if a== "H":
  print b
elif a== "D" and b== "H":
  b="D"
  print b
elif a== "D" and b=="D":
  b= "H"
  print b

Submission status: Accepted

Solution code:
import math

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 = input().rstrip("\r\n")
print("DH"[a==b])

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 == "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":
    if b == "H":
        print ("H")
    else:
        print ("D")
else:
    if b == "H":
        print ("D")
    else:
        print ("H")

Submission status: Accepted

Solution code:
a,b = [x for x in 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=map(str,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=map(str,input().split())
print('H' if a==b else 'D')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#ABC056.A
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:
s = input()

if s == 'H H' or s == '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:
#abc056 a 
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 = [i for i in input().split()]

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

Submission status: Accepted

Solution code:
a,b = tuple(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:
  print("H" if b=="D" else "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=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 == "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(b)
else:
  print('HD'.replace(b,''))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    a,b=input().split()
    if a==b:
        print("H")
    else:
        print("D")

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()
ok = [("H", "H"), ("D", "D")]
if (a, b) in ok:
    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 = map(str,input().split())
if a==b:
  print("H")
else:
  print("D")

Submission status: Accepted

Solution code:
# A - HonestOrDishonest
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":
  print(b)
  exit()
  
else:
  if b=="H":
    print("D")
    exit()
  if b=="D":
    print("H")
    exit()

Submission status: Accepted

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

Submission status: Accepted

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

print('DH'[a == b])

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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':
    if b=='H':
        print('H')
    else:
        print('D')
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 == 'D' and b == 'H':
    print('D')
elif a == 'H' and b == 'D':
    print('D')
else:
    print('H')

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 = 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=="D" and b=="D") or (a=="H" and b=="H"):
    print("H")
else:
    print("D")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if len(set((a,b))) == 1:
    ans = "H"
else:
    ans = "D"
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(a: str, b: str):
    print("HD"[(a == "H") ^ (b == "H")])


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = next(tokens)  # type: str
    b = next(tokens)  # type: str
    solve(a, b)


if __name__ == '__main__':
    main()

Submission status: Accepted

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