function Main(input) {
	var str = input;
	var ans = "";
	var count = 1;
	var str = str.split("\n")[0];
	str = str.split(" ")[0];
	var arr = Array.from(str);
	for(var i = 0;i<arr.length;i++){
		if(arr[i] ==="?"){
			if(i === 0){//先頭が?
				while(arr.length > count){
					if(arr[count]==="P"){//１つ先
						arr[count -1]="D";
					}else if(arr[count]==="D"){
						arr[count -1]="P";
					}else {
						count++;
						break;
					}
				}
			}else if(arr[i-1]==="P"){
				arr[i]="D";
			}else if(arr[i-1]==="D"){
				arr[i]="P";					
			}
		}	
	}
	if(arr[0] ==="?"){
		for(var j= 0;j<arr.length;j++){
			if(j %2===0){
				arr[j]="P";
			}else{
				arr[j]="D";
			}
		}
	}
	arr = arr.join("");
	console.log(arr);
	}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));