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):
T = list(map(str,input()))
for i,a in enumerate(T):
    if a == '?':
        T[i] = 'D'

print("".join(T))

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

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

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


if __name__ == "__main__":
    main()

Solution (Python):
S = input()
l = len(S)
res = ""
for i in range(l):
    if S[i] == "?":
        res += "D"
    else:
        res += S[i]
print(res)

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

Solution (Python):
T = str(input())
T += "P"
ans = ""



for i in range(len(T)-1):
    if i == 0 and T[i] == "?":
        if T[i+1] == "P":
            ans += "D"
        else:
            ans += "P"
    else:
        if T[i] == "?":
            if ans[-1] == "P":
                ans += "D"
            elif ans[-1] == "D":
                if T[i+1] == "P":
                    ans += "D"
                elif T[i+1] in ["D", "?"]:
                    ans += "P"
        else:
            ans += T[i]
print(ans)

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

Solution (Python):
t=list(input())
l=len(t)
for i in range(l):
    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):
T = str(input())

print(T.replace("?","D"))

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

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

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

Solution (Python):
t=input()
T = 'D'+t+'P'
res = []
flg = 0
for i in range(len(T)-2):
    if T[i]=='D' and T[i+2]=='D':
        if T[i+1]=='?':
            res.append('P')
        else:
            res.append(T[i+1])
    else:
        if T[i+1]=='?':
            res.append('D')
        else:
            res.append(T[i+1])
    
    
    
    
    
    
    
    
res2 = ''.join(res)
print(res2)

Solution (Python):
t=input()
l=len(t)
ans=''
for i in range(l):
    if t[i]=='?':
        ans+='D'
    else:
        ans+=t[i]
print(ans)

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

Solution (Python):


T = list(input())

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

print(''.join(T))

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

Solution (Python):

import sys
import math
import itertools
import collections

def solve(T):
    ans = ""
    for t in T:
        if(t == "?"):
            ans += "D"
        else:
            ans += t
    return ans
def main():
    T = list(input())
    
    print(solve(T))

if __name__ == "__main__":
    main()

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

t = ''.join(t)
print(t)

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):


def input_one_number():
    return int(input())

def input_multiple_number():
    return map(int, input().split())

def input_multiple_number_as_list():
    return list(map(int, input().split()))

T = input()

ans = ''
for i in range(len(T)):
	a = T[i]
	if T[i] == "?":
		a = 'D'
	ans += a

print(ans)

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

Solution (Python):
def main():
  table = list(input())
  for i in range(len(table)):
    if table[i] == '?':
      table[i] = 'D'
  print(''.join(table))
  
main()

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

Solution (Python):



def solve(*args: str) -> str:
    T = args[0]
    return T.replace('?', 'D')


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Solution (Python):

import sys, re
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

s = list(input())

for i, ch in enumerate(s):
    if(ch=='?'):
        s[i] = 'D'

print(''.join(s))

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

Solution (Python):
import sys
from math import factorial
from collections import Counter
from fractions import Fraction
import heapq, bisect, fractions
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
MOD = 10**9 + 7

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

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

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

Solution (Python):
T=input()
for i in range(len(T)):
  if T[i] == "?":
    print("D", end="")
  else:
    print(T[i], end="")
print()

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

Solution (Python):
t = input()

"""
d = 0
pd = 0
p=0
for s in t:
  if s =="d" or s=="?":
    d+=1
    if p==1:
      pd+=1
  else:
    p=1

print(d+pd)
"""

ans = ""
for s in t:
  if s == "?":
    ans += "D"
  else:
    ans += s
print(ans)

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

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

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

Solution (Python):
s = input()
ans = []
for i in s:
    if i == '?':
        ans.append('D')
    else:
        ans.append(i)
print(''.join(ans))

Solution (Python):
import sys
input = sys.stdin.readline
def main():
    T = list(input().rstrip())
    CNT = 0
    for i in range(len(T)):
        if T[i] == '?':
            if T[i-1] == 'P':
                T[i] = 'D'
                CNT += 2
            else:
                T[i] = 'D'
                CNT += 1
        elif T[i] == 'D':
            CNT += 1
    print(''.join(T))

if __name__ == '__main__':
    main()

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

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=input()
l=""
for i in range(len(t)):
    if t[i]=="?":
        l+="D"
    else:
        l+=t[i]
print(l)

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

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

Solution (Python):
str = input()

print(str.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  = list(str(input()))
for i in range(len(T)):
    if T[i] == '?':
        T[i] = 'D'

ans = ''.join(T)
print(ans)

Solution (Python):

T = list(input())


ans = 0 

now = 0

i = 0

while i < len(T):

    if T[i] == "?":
            T[i] = "D"
    i += 1

print ("".join(T))

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

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

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

Solution (Python):




import sys
input = sys.stdin.readline



def main():
    T = input().rstrip()

    N = len(T)
    res = ''

    for i in range(N):
        now = T[i]
        if now == '?':
            res += 'D'
        else:
            res += now

    print(res)



main()

Solution (Python):
inStr = input().rstrip('\n')

res = ''
for i, s in enumerate(inStr):
    if inStr[i] == '?':
        res += 'D'
    else:
        res += inStr[i]

print(res)

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

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







    



print("".join(t))

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

Solution (Python):
T = list(input())
for i in range(len(T)):
    if T[i] == '?':
        T[i] = 'D'

print(''.join(T))

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    t = input()
    f = {"P":0,"D":1}
    n = len(t)
    dp = [[0]*2 for i in range(n+1)]
    p = [[None]*2 for i in range(n+1)]
    for i in range(n):
        ni = i+1
        for j in range(2):
            if i > 0 and t[i-1] in "PD" and f[t[i-1]] != j:
                continue
            if t[i] == "?":
                for nj in range(2):
                    k = 0
                    if nj == 1:
                        k += 1
                        if j == 0:
                            k += 1
                    nd = dp[i][j]+k
                    if dp[ni][nj] <= nd:
                        dp[ni][nj] = nd
                        p[ni][nj] = j
            else:
                nj = f[t[i]]
                nd = dp[i][j]
                k = 0
                if nj == 1:
                    k += 1
                    if j == 0:
                        k += 1
                nd = dp[i][j]+k
                if dp[ni][nj] <= nd:
                    dp[ni][nj] = nd
                    p[ni][nj] = j
    if dp[n][0] < dp[n][1]:
        path = [1]
    else:
        path = [0]
    for i in range(1,n)[::-1]:
        path.append(p[i+1][path[-1]])
    k = "PD"
    ans = [k[i] for i in path[::-1]]
    print(*ans,sep="")
    return


if __name__ == "__main__":
    solve()

Solution (Python):
T = input()
l = len(T)
res = ""
for i in range(l):
    if T[i]=="?":
        res = res + "D"
    else:
        res = res + T[i]

print(res)

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

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

Solution (Python):






"""Module docstring
"""

import functools
import heapq
import itertools
import logging
import math
import os
import random
import string
import sys
from argparse import ArgumentParser
from collections import defaultdict, deque
from copy import deepcopy
from io import BytesIO, IOBase
from typing import Dict, List, Optional, Set, Tuple


def solve(values: List[int], nb: int) -> int:
    for _v in values:
        pass
    return nb


def do_job(stdin, stdout):
    "Do the work"
    LOG.debug("Start working")
    
    values = stdin.readline().strip()
    
    
    
    print(values.replace("?", "D"), file=stdout)


def print_output(testcase: int, result, stdout) -> None:
    "Formats and print result"
    if result is None:
        result = "IMPOSSIBLE"
    print("Case 
    
    


BUFSIZE = 8192


class FastIO(IOBase):
    
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def configure_log() -> None:
    "Configure the log output"
    log_formatter = logging.Formatter("L%(lineno)d - " "%(message)s")
    handler = logging.StreamHandler(IOWrapper(sys.stderr))
    handler.setFormatter(log_formatter)
    LOG.addHandler(handler)


LOG = None

if not LOG:
    LOG = logging.getLogger("template")
    configure_log()


def main(argv=None):
    "Program wrapper."
    if argv is None:
        argv = sys.argv[1:]
    parser = ArgumentParser()
    parser.add_argument(
        "-v",
        "--verbose",
        dest="verbose",
        action="store_true",
        default=False,
        help="run as verbose mode",
    )
    args = parser.parse_args(argv)
    if args.verbose:
        LOG.setLevel(logging.DEBUG)
    stdin = IOWrapper(sys.stdin)
    stdout = IOWrapper(sys.stdout)
    do_job(stdin, stdout)
    stdout.flush()
    for h in LOG.handlers:
        h.flush()
    return 0


if __name__ == "__main__":
    sys.exit(main())

Solution (Python):
t = input()
s = []
for i in range(len(t)):
  if t[i] == '?':
    s.append('D')
  else:
    s.append(t[i])
for i in range(len(s)):
    print(s[i], end='')

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

for i in range(len(t)):
    if i==0 and lis[i]=="?":
        lis[i]="D"
    if i>=1 and lis[i]=="?" and lis[i-1]=="D":
        lis[i]="D"
    if i>=1 and lis[i]=="?" and lis[i-1]=="P":
        lis[i]="D"
    if i>=1 and lis[i]=="?" and lis[i-1]=="?":
        lis[i]="D"

print(''.join(lis))

Solution (Python):
t = input()

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

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

for i in range(len(str_list)):
	if(str_list[i] == "?"):
		str_list[i] = "D"
o_str = "".join(str_list)
print(o_str)

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

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

main()

Solution (Python):
T = list(input())
for i, s in enumerate(T):
    if s == "?":
        T[i] = "D"

print("".join(T))

Solution (Python):

s=list(input())

for i in range(len(s)):
    if s[i]=='?':
        s[i]='D'

L=[str(a) for a in s]
L="".join(L)
print(L)

Solution (Python):
T = list(str(input()))
length = len(T)






for i in range(length):
    if T[i] == "?":
        T[i] = "D"

T=''.join(T)
print(T)

Solution (Python):
T = input()
ans = ""
for i in range(len(T)):
    if T[i] == 'P' or T[i] == 'D':
        ans += T[i]
    else:
        ans += "D"
print(ans)

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

Solution (Python):
T = input()

T = T.replace("?", "D")

print(T)

Solution (Python):
s = input()

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

Solution (Python):
b0=input()

st=""
for x in range(len(b0)):
  if b0[x]=="P":
    st=st+"P"
  else:
    st=st+"D"
    
print(st)

Solution (Python):
T = input()

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

Solution (Python):

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

Solution (Python):
t=input()

ans=""
for i in t:
  if i=="P":
    ans=ans+"P"
  else:
    ans=ans+"D"
print(ans)

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

for i in range(len(T)):
   if T[i] == '?':
       T[i] = 'D'
       
print(''.join(T))

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

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

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

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

Solution (Python):
t = input()

for i in range(len(t)):
    if t[i] == "?":
        print("D", end = "")
    else:
        print(t[i], end = "")

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

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

for i in range(len(pd_list)):
    if pd_list[i] == "?":
        pd_list[i] = "D"
print("".join(pd_list))

Solution (Python):
T = input()
print(T.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 = list(input())

for i, t in enumerate(T):
    if t == "?":
        T[i] = "D"

print(''.join(T))

Solution (Python):

import bisect
import collections
import sys

sys.setrecursionlimit(1000000)
ACMOD = 1000000007
INF = 1 << 62



def solve(T: str):
    T = T.replace('?','D')
    print(T)



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    T = next(tokens)  
    solve(T)

if __name__ == '__main__':
    main()

Solution (Python):



from collections import defaultdict

import sys, math
f = None
try:
	f = open('q1.input', 'r')
except IOError:
	f = sys.stdin
if 'xrange' in dir(__builtins__):
	range = xrange



	
def print_case_iterable(case_num, iterable):
	print("Case 

def print_case_number(case_num, iterable):
	print("Case 

def print_iterable(A):
	print (' '.join(A))

def read_int():
	return int(f.readline().strip())
def read_int_array():
	return [int(x) for x in f.readline().strip().split(" ")]
def rns():
	a =  [x for x in f.readline().split(" ")]
	return int(a[0]), a[1].strip()
def read_string():
	return list(f.readline().strip())
def bi(x):
	return bin(x)[2:]





from collections import deque
import math


def solution(s):
	sol = []
	for x in s:
		if x == 'P':
			sol.append('P')
		else:
			sol.append('D')
	return ''.join(sol)
	
			


def main():
	T = 1
	for i in range(T):
		s = read_string()
	
		x = solution(s)

		if 'xrange' not in dir(__builtins__):
			print(x)
		else:
			print >>output,str(x)
	if 'xrange' in dir(__builtins__):
		print(output.getvalue())
		output.close()

if 'xrange' in dir(__builtins__):
	import cStringIO
	output = cStringIO.StringIO()




if __name__ == '__main__':
	main()

Solution (Python):

def main(T):
    T = T.replace("?", "D")
    return T


T = input()


print(main(T))

Solution (Python):
import sys
from collections import deque
import copy
def main():
    T = input()
    ans = str()
    for i in range(len(T)):
        if T[i] == '?':
            ans += 'D'
        else:
            ans += T[i]
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
s = input()

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

Solution (Python):
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")



def main():
    T = input()[:-1]

    ans = ""
    for i in range(len(T)):
        if T[i] == "?":
            ans += "D"
        else:
            ans += T[i]
    
    print(ans)


if __name__ == '__main__':
    main()

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

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

Solution (Python):
s = input()

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

Solution (Python):
T=input()
ret=['']*len(T)

for i in range(len(T)):
    if T[i]=='?':
        ret[i]='D'
    else:
        ret[i]=T[i]

print(''.join(ret))

Solution (Python):
T = list("X"+input())
for i in range(1, len(T)):
    if T[i] == "?":
        T[i] = "D"

print("".join(T[1:]))

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

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

Solution (Python):

t=input()





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

Solution (Python):


import sys
readline = sys.stdin.readline
read = sys.stdin.read



s = input()

t = "".join(i if i!="?" else "D" for i in s)

print(t)

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

Solution (Python):
T = input()

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

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

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

Solution (Python):
T = input()
L = len(T)
ans = ""
for i in range(L):
  if T[i] == "?":
    ans = ans + "D"
  else:
    ans = ans + T[i]
print(ans)

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

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

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

Solution (Python):
import sys
import math
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
from collections import deque
from bisect import bisect_left
from itertools import product
def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]

def LSI(): return list(map(int, list(sys.stdin.readline().rstrip())))
def LSI2(N): return [list(map(int, list(sys.stdin.readline().rstrip()))) for i in range(N)]

def ST(): return sys.stdin.readline().rstrip()
def LST(): return sys.stdin.readline().rstrip().split()
def LST2(N): return [sys.stdin.readline().rstrip().split() for i in range(N)]
def FILL(i,h): return [i for j in range(h)]
def FILL2(i,h,w): return [FILL(i,w) for j in range(h)]
def FILL3(i,h,w,d): return [FILL2(i,w,d) for j in range(h)]
def FILL4(i,h,w,d,d2): return [FILL3(i,w,d,d2) for j in range(h)]
def sisha(num,digit): return Decimal(str(num)).quantize(Decimal(digit),rounding=ROUND_HALF_UP)

MOD = 1000000007
INF = float("inf")
sys.setrecursionlimit(10**6+10)

T = ST()
print(T.replace('?','D'))

Solution (Python):
T = input()

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

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


if __name__ == '__main__':
    main()

Solution (Python):






t = input()
len = len(t)

for i in range(len):
    if t[i] == "?":
        print("D", end = "")
    else:
        print(t[i], end = "")

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

Solution (Python):
def main():
    S = input()
    S = S.replace("?", "D")
    print(S)
if __name__ == "__main__":
    main()

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

Solution (Python):
t = list(input()) 
n=len(t)
for i in range(n):
    if t[i] == '?':
        t[i]='D'
print(*t,sep='')

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

Solution (Python):
T = input()
a = ''
for t in T:
    if t != '?':
        a += t
    else:
        a += 'D'
print(a)

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

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

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

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

Solution (Python):





T=list(input())
S=""
if T[0]=="?":
  S+="D"
else:
  S+=T[0]
for i in range(1,len(T)):
  if T[i]!="?":
    S+=T[i]
  else:
    S+="D"
print(S)

Solution (Python):
import sys

T=input()
newT=T.replace('?','D')
print(newT)

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

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

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

S = "".join(T)
print(S)

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

Solution (Python):
s = input()
ans = ''
for i in s:
    if i == 'P':
        ans += 'P'
    else:
        ans += 'D'
print(ans)

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

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

for i in range(len(t)):
    if t[i] == '?':
        t[i] = 'D'

print(''.join(t))

Solution (Python):

def Z(): return int(input())
def ZZ(): return [int(_) for _ in input().split()]

def main():
    T = input().replace('?', 'D')
    print(T)
    return

if __name__ == '__main__':
    main()

Solution (Python):
import sys


def input():
    return sys.stdin.readline()[:-1]

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

Solution (Python):
M =str(input())
p=[]
for i in range(len(M)):
    if M[i]=='?':
        p.append('D')
    else:
        p.append(M[i])
print("".join(p))

Solution (Python):
T=input()

print(T.replace("?","D"))

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

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

print(S)

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

Solution (Python):
T = input()

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

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

Solution (Python):
t = input()

res = []
for i in t:
  if i == 'P':
    res.append(i)
  elif i == 'D':
    res.append(i)
  else:
    res.append('D')
print(*res, sep='')

Solution (Python):

from sys import stdin
from operator import itemgetter
from collections import deque, Counter
import math
import pprint
from functools import reduce


MOD = 1000000007

def keta(kazu):
    kazu_str = str(kazu)
    kazu_list = [int(kazu_str[i]) for i in range(0, len(kazu_str))]
    return kazu_list

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def combination(m,n):
    if n > m:
        return 'すまん'
    return math.factorial(m) // (math.factorial(m-n) * math.factorial(n))

def main():
    s = stdin.readline().rstrip()
    ans = ""
    for i in range(len(s)):
        if s[i] == "?":
            ans += "D"
        else:
            ans += s[i]
    print(ans)
main()

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

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

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

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

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

Solution (Python):
a = input()

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

Solution (Python):
s = input()
n = len(s)
t = ''
for i in range(n):
  if s[i] == 'P':
    t += 'P'
  else:
    t += 'D'
print(t)

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

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

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

print(T)

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

Solution (Python):
s=input()
ans=""

for x in s:
    if x=="?":
        ans+="D"
    else:
        ans+=x
        
print(ans)

Solution (Python):

import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**6)
INF = float('inf')
MOD = 10 ** 9 + 7
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rf(): return float(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]
def rf_(): return [float(_) for _ in rs().split()]
def divisors(n, sortedresult=True):
    div = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            div.append(i)
            if i != n // i:
                div.append(n//i)
    if sortedresult:
        div.sort()
    return div

T = list(rs())
for i in range(len(T)):
    if T[i] == '?':
        if i > 0 and T[i - 1] == 'P':
            T[i] = 'D'
        elif i < len(T) - 1 and (T[i + 1] == '?' or T[i + 1] == 'D'):
            T[i] = 'P'
        else:
            T[i] = 'D'
print(''.join(T))

Solution (Python):
T = input()

T = T.replace('?', 'D')
print(T)

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

Solution (Python):
S=list(input())
for n in range(len(S)):
    if S[n]=='?':
        S[n]='D'
print(''.join(S))

Solution (Python):
T = list(input())
for i in range(len(T)):
    if T[i] == "?":
        T[i] = "D"
print(*T, sep="")

Solution (Python):
s=list(map(str,input()))
l=[]
for i in s:
    if i=='?':
        i='D'
    l.append(i)
for j in l:
    print('{}'.format(j),end='')

Solution (Python):
def main():
  t=input()
  print(t.replace('?','D'))
if __name__=='__main__':
  main()