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

#define MAX 200001

int main()
{
	char s[MAX];
	int i;

	scanf("%s", s);
	i = strlen(s);
	s[i] = '\0';


	i = 0;
	while (s[i] != '\0') {
		if (s[i] == '?') {

			if (i == 0)
				s[i] = 'P';
			else if (s[i - 1] == 'D')
				s[i] = 'P';
			else
				s[i] = 'D';
		}
		i++;
	}

	printf("%s\n", s);

	return 0;
}