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()
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:
#入力
lst = input().split()

a = lst[0]
b = lst[1]

#出力
if a == 'H': #Aは正直
   if b == 'H': #Tは正直:真
      print('H')
   elif b == 'D': #Tは嘘:真
      print('D')
elif a == 'D': #Aは嘘
   if b == 'H': #Tは正直:偽
      print('D')
   elif b == 'D': #Tは嘘:偽
      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:
print('DH'[len(set(input().split()))&1])

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

Submission status: Accepted

Solution code:
a,_,b=input()
print("DH"[a==b])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

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

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

if __name__ == '__main__':
    main()

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()

def response_atcoder(b):
  if b == 'H':
    return True
  if b == 'D':
    return False

answer = response_atcoder(b)
if a == 'D':
  answer = not(answer)

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

Submission status: Accepted

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

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

elif (a != b):
    print("D")

Submission status: Accepted

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

resolve()

Submission status: Accepted

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

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:
def actual(a, b):
    if a == b:
        return 'H'

    return 'D'

a, b = input().split()
print(actual(a, b))

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 = 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')
main()

Submission status: Accepted

Solution code:
lst = [0 if x == 'H' else 1 for x in map(str,input().split())]
print('H' if sum(lst)%2 == 0 else 'D')

Submission status: Accepted

Solution code:
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
#======================================================#
def main():
    a,b = IS().split()
    if a == 'H':
        print(b)
    elif a == 'D':
        if b == 'H':
            print('D')
        elif b == 'D':
            print('H')



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
a,b = map(str,input().split())
if not a in ("H","D"):
    sys.exit()

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()
print("DH"[a==b])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
print("HD"[len(set(input()))%2])

Submission status: Accepted

Solution code:
a, b = input().split()
print('DH'[a==b])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input()

t=s.split(' ')

if t[0]==t[1]:
  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('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' 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':
    print(b)
else:
    if b == 'H': print('D')
    else: print('H')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(str,input().split());print('DH'[a==b::2])

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":
    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:
    if 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:
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())

x={'H':1,'D':-1}

if x[a]*x[b]==1:
  print('H')
else:
  print('D')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
A,B = input().split()

d = {"H":0, "D":1}
Ans = ["H", "D"]

print(Ans[d[A]^d[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":
    if b == "H":
        print("H")
    if b == "D":
        print("D")
if a == "D":
    if b == "H":
        print("D")
    if b == "D":
        print("H")

Submission status: Accepted

Solution code:
s = input()
d = {'H H': 'H', 'H D': 'D', 'D H': 'D', 'D D': 'H'}
print(d[s])

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

print(a)

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

Submission status: Accepted

Solution code:
def another(s):
  if s == 'D':
    return 'H'
  else:
    return 'D'

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

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:
ab=input()
if ab.count("D")==1:
    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=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:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, _, b = input()
print(['D', 'H'][a==b])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input().split()
a = n[0]
b = 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:
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()
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()

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

resolve()

Submission status: Accepted

Solution code:
a,b = map(str,input().split())
if a == "H":
    if b == "H":
        print("H")
    elif b =="D":
        print("D")
if a == "D":
    if b =="H":
        print("D")
    elif b == "D":
        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:
#!/usr/bin/env python3

import sys
# import time
# import math
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)



def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1             # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    a, b = input().split()
    print('H') if a == b else print('D')


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:
print('DH'[input()in'H HD D'])

Submission status: Accepted

Solution code:
A, B = map(str, input().split())
def Main(A, B):
    return 'H' if A == B else 'D'
    
print(Main(A, B))

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

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:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

if __name__ == '__main__':
    main()

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:
def main():
  string = list(map(str,input().split()))
  if string[0]=='H':
    print(string[1])
  else:
    if string[1]=='H':
      print('D')
    else:
      print('H')

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":
   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 print("D")

Submission status: Accepted

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

if S[0]==S[1]:
    print('H')
else:
    print('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()
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':
    if b == 'H':
        print('H')
    else:
        print('D')
else:
    if not b == '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 == b:
    ans = "H"
else:
    ans = "D"

print(ans)

Submission status: Accepted

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

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

print(ans)

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

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:
# -*- coding: utf-8 -*-
"""
Created on Wed May 13 14:30:59 2020

@author: shinba
"""

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:
s = input()

if s == "D D" or s == "H H":
  print("H")
else:
  print("D")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect

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()
hatsugen=["H","D"]
idx=hatsugen.index(b)
if a=="H":
    print(hatsugen[idx])
else:
    print(hatsugen[1-idx])

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=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:
print("H" if len(set(input().split())) == 1 else "D")

Submission status: Accepted

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

if __name__ == '__main__':

    ABC_56_A()

Submission status: Accepted

Solution code:
N = [str(e) for e in input().split()]
if(N[0] == 'H'):
  if(N[1] == 'H'):
    print('H')
  else:
    print('D')
else:
  if(N[1] == '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")
  if b == "D":
    print("H")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log2
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a, b = MAP()

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

Submission status: Accepted

Solution code:
def main():
    a,b = (True if x=='H' else False for x in input().split())
    if (a and b) or (not a and not b): print('H')
    else: print('D')

if __name__ == '__main__':
    main()

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 == b else "D")

Submission status: Accepted

Solution code:
a,b=input().split();print(b if a=="H"else"HD"[a>b]if a==b else"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()
print(['D', 'H'][a==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 = map(str, input().split())
if 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:
dic = {("H", "H"): "H", ("H", "D"): "D", ("D", "D"): "H", ("D", "H"): "D"}
a, b = input().split()
print(dic[(a, b)])

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:
#!/usr/bin/env python3

a, b = input().split()

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