#include <stdio.h>
#include<string.h> 

int main(void)
{
	
	char k[1000000];
	int i;
	char a = '?';
	char b = 'P';
	char c = 'D';
	
	scanf("%s",k);
		
	for(i=  0; i <= 200002; i++){
		//printf("%d",i);
		//scanf("%c", &k[i]);
		if(k[i] == '\n'){
			break;
		}
		else if(k[i] == a){
			if(i == 0){
				k[i] = c;
			}
			else if(k[i-1] == b){
				k[i] = c;
			}
			else{
				k[i] = b;
			}
		}
		
	}
	
	//OUT:
	printf("%s", k);
	
	
	return 0;
}