program main
    implicit none
    character t*200000
    integer i,n

    read(*,*) t
    n = len_trim(t)
    do i = 1,n
        if(t(i:i) == "?") then
            if(t(i+1:i+1) == "D") then
                t(i:i) = "P"
            else 
                t(i:i) = "D"
            end if
        end if
    end do

    write(*,*) trim(t)

end program

