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"
            If Len(T) > 1 Then
                If Mid(T, 2, 1) = "P" Then
                    ret = "D"
                End If
            Else
                ret = "D"
            End If
        End If
        Dim r As String = ret
        Console.Write(r)

        For i = 2 To Len(T)
            Dim wk As String = Mid(T, i, 1)
            If wk = "?" Then
                If r = "P" Then
                    wk = "D"
                Else
                    wk = "P"
                End If
            End If
            'ret += wk
            r = wk
            Console.Write(r)
        Next

        Console.WriteLine("")

    End Sub
End Module
