import Foundation
var str = Array(readLine()!).map { String($0) }
for i in (0..<str.count).reversed() {
  if str[i] != "?" {
    continue
  }
  if i == str.count - 1 {
    str[i] = "D"
    continue
  }
  str[i] = str[i + 1] == "D" ? "P" : "D"
}
print(str.joined())