unittest
{
	assert( [ "H H" ].parse.expand.solve == "H" );
	assert( [ "D H" ].parse.expand.solve == "D" );
	assert( [ "D D" ].parse.expand.solve == "H" );
}



import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto ab = input.front.split;
	return tuple( ab[ 0 ], ab[ 1 ] );
}

auto solve( string a, string b )
{
	return ( a == b ) ? "H" : "D";
}
