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

Submission status: Accepted

Solution code:
x, y = input().split()
if x == y:
  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:
line = input().split()
if (line[0]=="H" and line[1]=="H") or (line[0]=="D" and line[1]=="D"):
    print("H")
else:
    print("D")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input();print("HD"[a[0]!=a[2]])

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

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

Submission status: Accepted

Solution code:
# A - HonestOrDishonest
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:
l = input().split()
print("H" if l[0]==l[1] else "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:
a, b = input().split()
if a==b:
    print('H')
else:
    print('D')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(a: str, b: str):
    if a == 'H':
        print(b)
    else:
        print('HD'[b == 'H'])

    return


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:
a, _, b=input()
print('DH'[a==b])

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:
H='H'
D='D'
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().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): 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 = 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:
def main():
    s = input().split()
    a=s[0]
    b=s[1]
    if( (a=="H" and b=="H") or (a=="D" and b=="D") ):
        print("H")
    else:
        print("D")
        
main()

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:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush, heapify
import math
import itertools
import random
 
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
 
INF = float('inf')
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    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")
    
    
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 = input()

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

Submission status: Accepted

Solution code:
hint = input()
print('H' if hint[0] == hint[2] else 'D')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

H = True if B=="H" else False
if A == "D":
  H = not(H)
print("H" if H 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')
elif a=='D' and b=='D':
    print('H')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#abc056 A HonestOrDishonest
a,_,b = input()
print("H" if a == b 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 ==  b:
    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()
print(("D","H")[a==b])

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()
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=input().split()
if a == 'H':
  print(b)
else:
  print({'H':'D', 'D':'H'}[b])

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()
H_D_map = {"H":1,"D":-1}
a = H_D_map[a]
b = H_D_map[b]

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

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:
#ABC057
a,b = input().split()
if int(a=='D') ^ int(b=='D') == 0:
  print('H')
else:
  print('D')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input().replace(" ","")
if s == "HH" or s == "DD":
    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()
print('HD'[a!=b])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s=input();print('DH'[s==s[::-1]])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC 56 A

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
a,b = list(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 = map(str,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 = map(str, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#56

a, b = input().rstrip().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:
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('DH'[a==b])

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

Submission status: Accepted

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

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 == 'H':
        print('D')
    else:
        print('H')
else:
    if b == 'D':
        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 (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" or a == "D" and 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 = 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())
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 print("D")
else:
    print("H") if b == "D" 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=input();print("DH"[a[0]==a[2]])

Submission status: Accepted

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


if __name__ == '__main__':
    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':
        print(b)
    else:
        if b == '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:
if len(set(input().split()))==2:
  print("D")
else:
  print("H")

Submission status: Accepted

Solution code:
Tmp = []
Tmp = input().rstrip().split(' ')
 
sA = (Tmp[0])
sB = (Tmp[1])
 
if sA == 'H' and sB == 'H':
  print('H')
elif sA == 'H' and sB == 'D':
  print('D')
elif sA == 'D' and sB == 'D':
  print('H')
elif sA == 'D' and sB == 'H':
  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:
num = input().split()
if num[0]==num[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 == "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 = 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=="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(a)
  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, b) == ('H', 'H') or (a, b) == ('D', 'D'):
  print('H')
else:
  print('D')

Submission status: Accepted

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

ans = 'H'

if a == 'H':
    if b != 'H':
        ans = 'D'
else:
    if b == 'H':
        ans = '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' 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 main():
    a, b = input().split()

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







if __name__ == '__main__':
    main()

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:
a, b = map(str, 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:
anslist = ['H', 'D']
A, B = input().split()
ans = 0
if A == 'D':
	ans += 1
if B == 'D':
	ans += 1
print(anslist[ans%2])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()
if a[0] == a[2] : 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":
    print(b)
elif a=="D":
    print("H") if b=="D" else print("D")

Submission status: Accepted

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

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

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 sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
letras= list()
lines = sys.stdin.readlines()
for linea in lines:
    c = linea.split()
    c = list(map(str,c))
list(c)
if c[0] == "D":
  if c[1]== "D":
    print("H")
  elif c[1] == "H":
    print("D") 
if c[0]== "H":
  print(c[1])

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

Submission status: Accepted

Solution code:
print(['D','H'][''.join(input().split()) in ['HH','DD']])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a, b = LS()
    if a == b:
        print("H")
    else:
        print("D")
    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

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:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(300000)


def solve(a: str, b: str):
    if a == 'H':
        ret = b
    elif b == 'H':
        ret = 'D'
    else:
        ret = 'H'
    print(ret)
    return


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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

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 == '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=="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:

x, y = input().split()

if(x != y):
  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":
    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:
td = 0# 0 is honest and 1 is lier
a,b = input().split()
if b=="D":
  td+=1
if a == "D":
  td+=1
if td%2 == 0:
  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:
x = input().split()
dictionary = {'H':'D','D':'H'}
print(x[1] if x[0]=='H' else dictionary[x[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 = map(str,input().split())
if a==b:
    print('H')
else:
    print('D')

Submission status: Accepted

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

if a[0] == "H":
  print(a[1])
else:
  if a[1] == "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 = 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(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=input().split()
if A==B:
  print("H")
else:
  print("D")

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 1

if a == "H":
    cnt *= 1
else:
    cnt *= -1

if b == "H":
    cnt *= 1
else:
    cnt *= -1

print("H") if cnt == 1 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:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

a, b = sl()

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

Submission status: Accepted

Solution code:
d, h = map(str, input().split())

if d == "H" and h == "H":
    print("H")
elif d == "H" and h == "D":
    print("D")
elif d == "D" and h == "H":
    print("D")
elif d == "D" and h == "D":
    print("H")

Submission status: Accepted

Solution code:
# A問題
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(["D","H"][a==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 = list(input().split(' '))

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

Submission status: Accepted

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


if __name__ == '__main__':
	main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

if b == "H" : #AtCoDeerくんは「TopCoDeerくんは正直者だ」
    if a == "H":
        print("H")
    else :
        print("D")
    
else : #aAtCoDeerくんは「TopCoDeerくんは嘘つきだ」
    if a == "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:
a, b = input().split()
if 'H' == a:
    print(b)
else:
    if a == 'H':
        print('H')
    else:
        if b == 'D':
            print('H')      
        else:  
            print('D')