"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const S = arg[0].split("");
    const N = S.length;
    
    // 次がDならPにした方が良い
    for(let i=0; i<N-1; i++) {
        if(S[i] !== "?") continue;
        
        if(S[i+1] === "D" || S[i+1] === "?") {
            S[i] = "P";
        } else {
            S[i] = "D";
        }
    }
    
    if(S[S.length-1] === "?") {
        S[S.length-1] = "D";
    }
    
    console.log(S.join(""));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));