#include<stdio.h>
#include<string.h> //strcmp、strncmp関数を使うために必要
     
int main(void)
{
    int i;
    char *s1;
    char a[200000];


    scanf("%s%*c",a);

    for(i=0;i<=200000;i++){
        if(a[i]=='\0'){ break;}
        if('?' == a[i]){
            if('?' == a[i+1]&&'P'== a[i-1]){
                a[i]='D';
                break;
            }else if('?' == a[i+1]&&'D'== a[i-1]){
                a[i]='P';
                break;
            }else if('D' == a[i+1]){
                a[i]='P';
            }else if('P'== a[i-1]&&'D' == a[i+1]){
                a[i] = 'D';
                break;
            }else{
                a[i] = 'D';
                break;
            }
        }
    }

    printf("%s\n",a);
      return 0;
}