function Main(input){   
    let arr = input.split('');
    let num = 0;
    while(true){
        num = arr.indexOf('?');
        if(num !== -1){
            if(arr[num-1] == 'D' && arr[num+1] == 'D' || arr[num+1] == '?'){
                arr[num] = 'P';
            }else {
                arr[num] = 'D';
            }
        } else{
            break;
        }
    }
    console.log(...arr);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));