object Main extends App {
  @scala.annotation.tailrec
  def loop(c: Char, chars: List[Char], acc: List[Char]): String =
    chars match {
      case Seq() => new String(acc.toArray)
      case '?' :: xs =>
        val replace = if (c == 'D') 'P' else 'D'
        loop(replace, xs, replace :: acc)
      case x :: xs => loop(x, xs, x :: acc)
    }

  val sc = new java.util.Scanner(System.in)
  val chars = sc.next().reverse.toCharArray.toList
  println(loop('_', chars, List.empty))
}
