#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main(void)
{
  char s[200001];
  int i=0;

  scanf("%s",s);

  while(s[i]=='P' || s[i]=='D' || s[i]=='?')
  {
    if(s[i]=='?') printf("D");
    else printf("%c",s[i]);
    i++;
  }

  printf("\n");

  return 0;
}