fun main(args: Array<String>) {
  val T = readLine()!!
  
  val t_replace = T.replace("?","D")
  val p_replace = T.replace("?","P")
  
  val t_count = t_replace.chunked(1).filter { it == "D" }.size
  val p_count = p_replace.chunked(2).filter { it == "PD" }.size
  
  if (t_count > p_count)  {
    println(t_replace)
  } else {
    println(p_replace)
  }
}