Problem:
 Score : 200 points    Problem Statement For a string S consisting of the uppercase English letters P and D , let the doctoral and postdoctoral quotient of S be the total number of occurrences of D and PD in S as contiguous substrings. For example, if S =  PPDDP , it contains two occurrences of D and one occurrence of PD as contiguous substrings, so the doctoral and postdoctoral quotient of S is 3 .  We have a string T consisting of P , D , and ? .  Among the strings that can be obtained by replacing each ? in T with P or D , find one with the maximum possible doctoral and postdoctoral quotient.      Constraints  1 \leq |T| \leq 2 \times 10^5  T consists of P , D , and ? .         Input Input is given from Standard Input in the following format:  T       Output Print one string with the maximum possible doctoral and postdoctoral quotient among the strings that can be obtained by replacing each ? in T with P or D .
If there are multiple such strings, you may print any of them.        Sample Input 1 PD?D??P      Sample Output 1 PDPDPDP  This string contains three occurrences of D and three occurrences of PD as contiguous substrings, so its doctoral and postdoctoral quotient is 6 , which is the maximum doctoral and postdoctoral quotient of a string obtained by replacing each ? in T with P or D .       Sample Input 2 P?P?      Sample Output 2 PDPD

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

from collections import defaultdict, deque
from sys import exit
import math
import copy
from bisect import bisect_left, bisect_right
from heapq import *
import sys

INF = 10 ** 17
MOD = 1000000007

from fractions import *
def inverse(f):
    
    return 1/f


def combmod(n, k, mod=MOD):
    ret = 1
    for i in range(n - k + 1, n + 1):
        ret *= i
        ret %= mod

    for i in range(1, k + 1):
        ret *= pow(i, mod - 2, mod)
        ret %= mod

    return ret

def solve():
    s = input().strip()
    print(s.replace("?", "D"))

def main():
    
    
    solve()
if __name__ == "__main__":
    solve()

"""
    12
    3 2
    3 2
    0 1
    2 -1
    -3 -9
    -8 12
    7 0
    8 1
    8 2
    8 4
    0 0
    0 0
"""

Solution (Python):
t = input()
print(t.replace("?", "D"))

Solution (Python):
print(input().replace("?","D"))

Solution (Python):
s = input().replace("?", "D")
print(s)

Solution (Python):
T = input()
print(T.replace("?", "D"))

Solution (Python):
s=input().replace("P?","PD").replace("?D","PD").replace("??","PD").replace("?","D")
print(s)

Solution (Python):
T = input()

S=""
for t in T:
    if t=="?":
        S+="D"
    else:
        S+=t
print(S)

Solution (Python):
s = input()
print(s.replace('?', 'D'))

Solution (Python):
t = list(input())

n = len(t)

for i in range(n):
    if t[i] == "?":
        t[i] = "D"

print("".join(t))

Solution (Python):
t = input()
print(t.replace("?", "D"))

Solution (Python):
t = input()
t = t.replace("?", "D")
print(t)

Solution (Python):
T = input()
print(T.replace("?", "D"))

Solution (Python):
t=list(input())
c=0
for i in range(len(t)):
    if t[i]=='?':
        t[i]='D'
for i in range(len(t)):
    print(t[i],end='')

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

t = readline().rstrip().decode()
t = t.replace('?', 'D')
print(t)

Solution (Python):
S = input()
S = S.replace('?', 'D')
print(S)

Solution (Python):
t = list(str(input()))
ans = ""
for i in t:
  if i == "?":
    ans += "D"
  else:
    ans += i
print(ans)

Solution (Python):
s = list(input())
for i in range(len(s)):
    if s[i] == "?":
        s[i] = "D"
print("".join(s))

Solution (Python):
t = input()
print(t.replace('?','D'))

Solution (Python):
print(input().replace("?","D"))

Solution (Python):
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    T = input().rstrip('\n')
    ans = []
    for t in T:
        if t == "?":
            ans.append("D")
        else:
            ans.append(t)
    print("".join(ans))


if __name__ == '__main__':
    main()

Solution (Python):
T = input()
ans = []
for t in T:
    if t == "?":
        ans.append("D")
    else:
        ans.append(t)
print("".join(ans))

Solution (Python):
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))



T = list(input())

n = len(T)

for i in range(n):
    if T[i] == '?':
        T[i] = 'D'

print(''.join(T))

Solution (Python):
print(input().replace('?', 'D'))

Solution (Python):
t = list(input())
for i in range(len(t)):
	if t[i] == "?":
		t[i] = "D"
print("".join(t))

Solution (Python):
t = input()
print(t.replace("?","D"))

Solution (Python):
t = input()

print(t.replace('?', 'D'))

Solution (Python):
print(input().replace('?', 'D'))

Solution (Python):
print(input().replace("?", "D"))

Solution (Python):
S = list(input())
N = len(S)
for i in range(N):
    if S[i] == "?":
        S[i] = "D"
ans = "".join(S)
print(ans)

Solution (Python):
t = input()


print(t.replace('?', 'D'))

Solution (Python):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = read().rstrip().decode()

print(S.replace('?', 'D'))

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

print(input().replace('?','D'))

Solution (Python):
t = input()
print(t.replace('?', 'D'))

Solution (Python):
T = input()
print(T.replace('?', 'D'))

Solution (Python):
t=input()
s=""
for i in t:
  if i=="?":s+="D"
  else:s+=i
print(s)

Solution (Python):
t = input()

print(t.replace('?', 'D'))

Solution (Python):
s = input()
s = s.replace('?', 'D')
print(s)

Solution (Python):
t = input()
print(t.replace("?", "D"))

Solution (Python):
T = input()
print(T.replace('?','D'))

Solution (Python):
t=input()
s=""
for i in range(len(t)):
    if t[i]!="?":
        s+=t[i]
    else:
        s+="D"
print(s)