#include <stdio.h>
int main(void){
    // Your code here!
    char str[200001];
    char *pstr = str;
    int len = 0;
    
    scanf("%200000s",str);
    
    while(*pstr){
        pstr++;
        len++;
    }
    
    for(int i = len-1; i >= 0; i--){
        if(str[i] == '?'){
            if(i == len -1){
                str[i] = 'D';
            }
            else if(str[i+1] == 'P'){
                str[i] = 'D';
            }
            else if(str[i+1] == 'D'){
                str[i] = 'P';
            }
        }
    }
    
    printf("%s\n",str);
}
