#include<stdio.h>
#define N 255

int main() {
    char s[N];
    int i,c = 0;

    scanf ("%s", s);
    while (s[i] != '\0') {
        if (s[i] == '?') {
            if (s[i - 1] == 'P')
                s[i] = 'D';
            else if (s[i - 1] == 'D')
                s[i] = 'P';
        }
        i++;
    }
    printf("%s\n", s);
    return 0;
}