unittest
{
//	assert( [ "PD?D??P" ].parse.expand.solve == "PDPDPDP" );
	assert( [ "PD?D??P" ].parse.expand.solve == "PDDDDDP" );
	assert( [ "P?P?" ].parse.expand.solve == "PDPD" );
}



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 t = input.front.to!( dchar[] );
	return tuple( t );
}

auto solve( dchar[] t )
{
	return t.replace( "?", "D" );
}
