Imports System

Module Program
    Sub Main(args As String())
        Dim T As String = Console.ReadLine()

        Dim ret As String = Left(T, 1)
        If ret = "?" Then
            ret = "P"
        End If

        For i = 2 To Len(T)
            Dim wk As String = Mid(T, i, 1)
            If wk = "?" Then
                If Right(ret, 1) = "P" Then
                    wk = "D"
                Else
                    wk = "P"
                End If
            End If
            ret &= wk
        Next

        Console.WriteLine(ret)

    End Sub
End Module
