#include<stdio.h>

int main(void){

	char string[200001];
	char changedString[200001];

	int p = 'P', d = 'D', question = '?';
	int i, answerp =0, answerd =0;

	gets(string);

	//copystring
	for (i = 0;string[i] != '\0';i++) {
		changedString[i] = string[i];
	}
	changedString[i] = '\0';

	//changechar
	for (i = 0;string[i] != '\0';i++) {
		if (string[i] == question) {
			string[i] = p;
			changedString[i] = d;
		}
	}

	//count
	for (i = 1;string[i]!='\0';i++) {
		if (string[i] == d ) {
			answerp++;
			if (string[i - 1] == p) {
				answerp++;
			}
		}
	}

	for (i = 1;changedString[i] != '\0';i++) {
		if (changedString[i] == d) {
			answerd++;
			if (string[i - 1] == p) {
				answerd++;
			}
		}
	}

	if (answerp > answerd) {
		printf("%s", string);

	}
	else
	{
		printf("%s", changedString);

	}


	}