#include <stdio.h>
#define  N 200000
int main()
{

    char s[N];
    int countD=0;
    int countPD = 0;
    int pre = 1;//1なら以前がP
    scanf("%s", s);

    for (int i = 0; s[i] != '\0'; i++){
        if (s[i]=='?'){
            s[i] = 'D';
            countD++;
            countPD += pre;
            pre = 0;
        }
        else if(s[i]=='D'){
            countD++;
            countPD += pre;
            pre = 0;
        }
        else {
            pre = 1;
        }
    }


          //  printf("%d\n",countD+countPD);
      
            printf("%s",s);
        


    printf("\n");
}