#include<bits/stdc++.h>
using namespace std;
int main()
{
	char a,b;
	cin>>a>>b;
	if(a=='H' || a=='D')
	{
		if(b=='H' || b=='D')
		{
			
			if(a==b)
			{
				cout<<"H";
			}
			else 
			{
				cout<<"D";
		
			}
		}
	}
	else
	{
		cout<<"Error";
	}
}