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

#define MAX 200001

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

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


	i = 0;
	while (i<k) {
		next = i + 1;
		if (s[i] == '?') {
			if (next == k)
				s[i] = 'D';
			else if (s[next] == 'D' || s[next] == '?')
				s[i] = 'P';
			else
				s[i] = 'D';
		}
		i++;
	}

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

	return 0;
}