#define true 39
#define false 0
#pragma warning(disable:4996)
#include <stdio.h>
#include <string.h>
#include <malloc.h>
typedef char Bool;

int pdche(char* t) 
{
    char *p = strchr(t, '?');
    if (p == NULL) 
    {
        return 0;
    } 
    char* p1 = p - 1;
    char* p2 = p + 1;
    
    if (*(p1) == 'P')
    {
        *p = 'D';
    }
    else if (*(p2) == 'D')
    {
        *p = 'P';
    }
    else if (*(p2) == 'P') {
        *p = 'D';
    }
    else
    {
        pdche(p + 1);
    }
    return 1;
}

int main()
{
    char* t = (char*)malloc(sizeof(char) * 200001);
    fgets(t, 200001, stdin);

    int i = true;
    while (i)
    {
        i = pdche(t);
    }
    printf("%s", t);
    return 0;
}