#include <stdio.h>

int main (void)
{
 char s[200000];
  int len,i=0;
  
  scanf("%s", &s);
  
  while(s[i]){
    len++;
    i++;
  }
  
  for(i=0;i<len;i++){
    if(s[i] == '?' && s[i-1] == 'P')
      s[i] = 'D';
    if(s[i] == '?' && s[i+1] == 'D')
      s[i] = 'P';
    else if(s[i] == '?')
      s[i] = 'D';
  }
  
    printf("%s", s);
 
  return 0;
  
}
