function Main(input) {
  input = input.replace(/\n/g, ' ');
  input = input.split(" ");
  var A = input[0];
  var moji  = A.split("");
  for(var i=0;i<moji.length;i++){
    var p = moji[i];
    if(p=="?"){
      if(i==0){
        if(i+1!=moji.length){
          if(moji[i+1]!="P"){
            moji[i]="P";
          }else{
            moji[i]="D";
          }
        }else{
          moji[i]=="D";
        }
      }else if(i+1==moji.length){
        moji[i-1]="D";
      }else{
        if(moji[i-1]=="P"){
          moji[i]="D";
        }else{
          if(moji[i+1]!="P"){
            moji[i]="P";
          }else{
            moji[i]=="D";
          }
        }
      }
    }
  }
  console.log(moji.join(""));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));