Problem:
Score : 100 points

Problem Statement

Two deer, AtCoDeer and TopCoDeer, are playing a game called Honest or Dishonest.
In this game, an honest player always tells the truth, and an dishonest player always tell lies.
You are given two characters a and b as the input. Each of them is either H or D, and carries the following information:

If a=H, AtCoDeer is honest; if a=D, AtCoDeer is dishonest.
If b=H, AtCoDeer is saying that TopCoDeer is honest; if b=D, AtCoDeer is saying that TopCoDeer is dishonest.

Given this information, determine whether TopCoDeer is honest.

Constraints

a=H or a=D.

b=H or b=D.

Input

The input is given from Standard Input in the following format:

a b

Output

If TopCoDeer is honest, print H. If he is dishonest, print D.

Sample Input 1

H H

Sample Output 1

H

In this input, AtCoDeer is honest. Hence, as he says, TopCoDeer is honest.

Sample Input 2

D H

Sample Output 2

D

In this input, AtCoDeer is dishonest. Hence, contrary to what he says, TopCoDeer is dishonest.

Sample Input 3

D D

Sample Output 3

H

Solution in C# (Mono 4.6.2.0) (judge verdict: Accepted)

using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.Remoting.Contexts;
class Simple {
    private string a, b;
    void Solve() {
        //input
        a = io.String;
        b = io.String;
        //cal
        Func <string, bool> isHonest = (str) => str == "H";
        var ans = !(isHonest(a) ^ isHonest(b));
        //ret
        Console.WriteLine(ans?"H":"D");            
    }
    SimpleIO io = new SimpleIO();
    public static void Main(string[] args) => new Simple().Stream();
    private void Stream() {
        //var exStdIn = new System.IO.StreamReader("stdin.txt");
        //System.Console.SetIn(exStdIn);
        Solve();
        io.Flush();
    }
}
class SimpleIO {
    string[] _nextBuffer;
    int _bufferCnt;
    char[] cs = new char[] {' ', '"', ','};
    StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()) {AutoFlush = false};
    public SimpleIO() {
        _nextBuffer = new string[0];
        _bufferCnt = 0;
        Console.SetOut(sw);
    }
    public string Next() {
        if(_bufferCnt < _nextBuffer.Length) return _nextBuffer[_bufferCnt++];
        var st = Console.ReadLine();
        while(st == "") st = Console.ReadLine();
        if(st != null) _nextBuffer = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        else st = "";
        _bufferCnt = 0;
        return _nextBuffer[_bufferCnt++];
    }
    public string String => Next();
    public char Char => char.Parse(String);
    public int Int => int.Parse(String);
    public long Long => long.Parse(String);
    public double Double => double.Parse(String);
    public void Flush() { Console.Out.Flush(); }
}
static class NumericEx {
    public static string pad0 <T>(this T v, int n) { return v.ToString().PadLeft(n, '0'); }
    public static double RoundOff(this double v, int n) { return Math.Round(v, n - 1, MidpointRounding.AwayFromZero); }
    public static bool Odd(this int v) { return v % 2 != 0; }
    public static bool Odd(this long v) { return v % 2 != 0; }
    public static void REP(this int v, Action <int> act) {
        for(int i = 0; i < v; ++i) act(i);
    }
    public static void REPR(this int v, Action <int> act) {
        for(int i = v - 1; i >= 0; --i) act(i);
    }
}