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 main():
    t = input()
    n = len(t)

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


if __name__ == '__main__':
    main()

Solution (Python):
t=str(input())
strd=t.replace('?','D')
strp=t.replace('?','P')

cntd=strd.count('PD')+strd.count('D')
cntp=strp.count('PD')+strp.count('D')
print(strd if cntd>cntp else strp)

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=["."]+list(input())
for i in range(len(T)):
    if T[i]=="?":
        if T[i-1]=="P":
            T[i]="D"
        else:
            T[i]="D"
print(*T[1:],sep="")

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

Solution (Python):
import sys
input = sys.stdin.readline

T = list(input().rstrip('\n'))
res = str()
for x in T:
  if x=='?':
    add='D'
  else:
    add=x
  res += add
print(res)

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

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

print(ans)

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

print(result)

Solution (Python):
t = input()
l = len(t)
ans = ""
for s in t:
    if s == '?':
        ans += 'D'
    else:
        ans += s
print(ans)

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

Solution (Python):
def resolve():
    '''
    code here
    '''
    import collections
    T = input()

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



if __name__ == "__main__":
    resolve()

Solution (Python):
s = input()
s_len = len(s)
li = [0]*s_len
for i in range(s_len):
    if s[i] == "?":
        li[i] = "D"
    else:
        li[i] = s[i]
print("".join(li))

Solution (Python):
input1 = str(input())

temp = ""

for i in range(len(input1)):
    if input1[i] == "P":
        temp += "P"
    else:
        temp += "D"
        
print(temp)

Solution (Python):
import sys
input = sys.stdin.readline
s=input()
s=[s[i] for i in range(len(s))]
s=s[:len(s)-1]
for i in range(len(s)):
  if s[i]=='?':
    s[i]='D'
print(''.join(s))

Solution (Python):
t=input()
ans=[]
i=0

while i<len(t):
    if t[i]!="?":
        ans.append(t[i])
    else:
        ans.append("D")
    i+=1
print("".join(ans))

Solution (Python):


T = input()






















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

Solution (Python):






T = input()





ans = []
for i,x in enumerate(T):
    if x == "?":
        ans.append("D")
    else:
        ans.append(x)
print("".join(ans))

Solution (Python):
"""
DDD PDDDDDP 5+1
DDP PDDDDPP 4+0
DPD PDDDPDP 4+2
DPP PDDDPPP 3+1

PDD PDPDDDP 4+2
PDP PDPDDPP 3+2
PPD PDPDPDP 3+3
PPP PDPDPPP 2+2
"""

t = input()
tt = t.replace('?', 'D')
print(tt)

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

Solution (Python):
import sys,collections

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

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

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

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

Solution (Python):
'''
.append(要素) リストに要素を追加
.extend(リスト) リストを連結する
.insert(場所,要素) 指定した場所に要素追加
del 配列名[場所]
-1で末尾で末尾から一つ前

sort()
sorted(reverse=true)

配列の初期化
配列名=[a]*n+[b]*m

Decimal()
'''

from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math
from functools import reduce
from operator import mul
from collections import Counter
import itertools
import fractions
import sys
d = stdin.readline().rstrip()
print(d.replace('?', 'D'))

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

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

Solution (Python):

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

    print(''.join(T))

if __name__ == "__main__":
    main()

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

Solution (Python):
pd = input()
after_pd=""
for i in pd:
    if i=="?":
        after_pd += "D"
    else:
        after_pd += i
count = 0










print(after_pd)

Solution (Python):
t = input()

s = ""

last = ""
for i in range(len(t)):
    if t[i] == "P" or t[i] == "D":
        s += t[i]
    else:
        s += "D"

print(s)

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

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

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

print(''.join(map(str, T)))

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

print(ans)

Solution (Python):
t=input()
n=len(t)

ans=[]

for i in range(n):
    if(t[i]=='?'):
        ans.append('D')
    else:
        ans.append(t[i])

print("".join(ans))

Solution (Python):
import sys
from io import StringIO
import unittest


def resolve():
    t = list(input())

    if t[0] == '?':
        t[0] = 'D'

    for i in range(1, len(t) - 1):
        if t[i] == '?':
            if t[i - 1] == 'P':
                t[i] = 'D'
            else:
                if t[i + 1] == '?':
                    t[i] = 'P'
                    t[i + 1] = 'D'
                elif t[i + 1] == 'D':
                    t[i] = 'P'
                else:
                    t[i] = 'D'

    if t[-1] == '?':
        t[-1] = 'D'

    print(''.join(t))



class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """PD?D??P"""
        output = """PDPDPDP"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """P?P?"""
        output = """PDPD"""
        self.assertIO(input, output)


if __name__ == "__main__":
    
    resolve()

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

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

Solution (Python):
T = input()

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

Solution (Python):
def judge(T):
    count = 0
    for i in range(len(T)):
        if T[i] == "D":
            count += 1
        if not i == len(T) and T[i:i+2] == "PD":
            count += 1
    return count


if __name__ == '__main__':
    T = input().strip()

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

Solution (Python):
t = input();
d_count = t.count("D")
pd_count = t.count("PD")

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

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

Solution (Python):
T=input()
l=len(T)
ans = []
for i in range(l):
    if T[i] == 'P':
        ans.append('P')
    else:
        ans.append('D')
fans = ans[0]
for i in range(1,l):
    fans = fans + ans[i]
print(fans)

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

print(new_T)

Solution (Python):
t=input()
ans=t.translate(str.maketrans({'?': 'D'}))
print(ans)

Solution (Python):
t =input()





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

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

t=input()

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

Solution (Python):
t = input()

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

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

for i in range(N):
  if T[i] == '?':
    if T == ['?']:
      print('D')
      exit()
    if i == 0:
      if T[1] == 'D':
        T[0] = 'P'
      elif T[1] == 'P':
        T[0] = 'D'
      else:
        T[0] = 'P'
    elif i == N - 1:
      T[i] = 'D'
    else:
      if T[i-1] == 'P':
        T[i] = 'D'
      else:
        if T[i+1] == '?':
          T[i] = 'P'
        else:
          if T[i+1] == 'D':
            T[i] = 'P'
          else:
            T[i] = 'D'
          
print("".join(T))

Solution (Python):
import sys
import math
from collections import deque
from collections import defaultdict

def main():
    s = list(input())
    for x in range(len(s)):
        if s[x] == '?':
            s[x] = 'D'
    print(''.join(s))
    return 0

if __name__ == "__main__":
    main()

Solution (Python):
t = input()

s = []
for i in range(len(t)):
    if t[i]=="?":
        s.append("D")
    else:
        s.append(t[i])
print(*s, sep="")

Solution (Python):
import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush,heapify
import math
from copy import deepcopy
import queue

Mod = 1000000007
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[y] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)

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

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

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

Solution (Python):
s = str(input())
n = len(s)
t= list(s)
ans = ""
for i in range(n):
  if t[i] == "?":
    t[i] = "D"

ans = ''.join(t)

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline

t=input()


ans=[]
for i in range(len(t)):
    if t[i]== "?":
        ans.append("D")
    else:
        ans.append(t[i])

for i in range(len(ans)):
    print(ans[i], end="")

Solution (Python):
from __future__ import division, print_function
import sys
if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip

import os, sys, bisect, copy
from collections import defaultdict, Counter, deque

if os.path.exists('in.txt'): sys.stdin=open('in.txt','r')
if os.path.exists('out.txt'): sys.stdout=open('out.txt', 'w')

def input(): return sys.stdin.readline()
def mapi(arg=0): return map(int if arg==0 else str,input().split())


a = list(input().strip())
n = len(a)
for i in range(n):
    if a[i] =="?":
        a[i] = "D"
print("".join(a))

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

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

Solution (Python):
t = list(input())
ans = []

for i in t:
    if i == '?':
        ans.append('D')
    else:
        ans.append(i)

print(''.join(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):
T = input()
T_list = list(T)
size = len(T_list)

for i in range(size):
    if T_list[i] == '?':
        T_list[i]='D'

print(''.join(T_list))

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

Solution (Python):
S = input()

ns = ""
for i in S:
    if i == '?':
        ns += 'D'
    else:
        ns += i

print(ns)

Solution (Python):
t=list(input())
ans = 0
if len(t) != 1:
	for i in range(len(t)):
		if i != 0 and i != len(t)-1:
			if t[i] == "?":
				if t[i-1] == "P":
					t[i] = "D"
				elif t[i+1] == "D" or t[i+1] == "?":
					t[i] = "P"
				else:
					t[i] = "D"
		elif i==0:
			if t[i] == "?":
				if t[i+1] == "D" or t[i+1] == "?":
					t[i] = "P"
				else:
					t[i] = "D"
		else:
			if t[i] == "?":
				t[i] = "D"
else:
	if t[0] == "?":
		t[0] = "D"
print("".join(t))

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())
ans = []

for i in t:
    if i == '?':
        ans.append('D')
    else:
        ans.append(i)

print(''.join(ans))

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

Solution (Python):
s = input()

output = []
for i, letter in enumerate(s):
    if letter != "?":
        output.append(letter)
    else:
        output.append("D")
print("".join(output))

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

Solution (Python):
T = input()
S = []
for t in T:
    if t == '?':
        S.append('D')
    else:
        S.append(t)
print(*S, sep='')

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

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

ans=""
for i in range(N):
    ans+=T[i]
print(ans)

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

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

Solution (Python):
s=input()
for i in s:
    if i=='?': print('D',end='')
    else: print(i,end='')

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

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

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

Solution (Python):
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline



def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    t = gete()

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


if __name__ == "__main__":
    main()

Solution (Python):
t = input()
lent = len(t)
ans = ""
if t[lent-1] == 'D':
    ans+='D'
elif t[lent-1] == 'P':
    ans+='P'
else:
    ans+='D'
for i in range(2,lent+1):
    if t[lent-i] == 'D':
        ans+='D'
    elif t[lent-i] == 'P':
        ans+='P'
    else:
        ans+='D'
ans = ans[::-1]
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()

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

print(ans)

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):
T=input()
t=[]
for i in T:
    t.append(i)
n=len(t)
for i in range(n):
    if t[i]=="?":
        t[i]="D"
for i in t:
    print(i,end="")

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

Solution (Python):
from sys import stdin
import math
a=stdin.readline()

for k in range(0,len(a)):
    if a[k]=='?':
        print('D',end='')
    else:
        print(a[k],end='')

Solution (Python):


T = str(input())

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

print(T)

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

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

t = ["D" if i == "?" else i for i in t]

[sys.stdout.write(i) for i in t]
print("")

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

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

print(ans)

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

    ans += T[i]

print(ans)

Solution (Python):
t = str(input())
a = []
cnt = 0
show = 0
for i in range(len(t)):
    if t[i] == '?':
        a.append('D')
    else:
        a.append(t[i])
print("".join(a))

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

x = len(t)

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

Solution (Python):


T = list(input())

T = [t if t != '?' else 'D' for t in T ]

print(''.join(T))

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

Solution (Python):
T=input()

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

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

Solution (Python):









t = input()




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

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

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

Solution (Python):
t = input().strip()

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

Solution (Python):
t = input()
ans = [None for _ in range(len(t))]
i = 0
while i < len(t):
    if t[i] == '?':
        if i == len(t)-1 or t[i+1] == 'P' or (i != 0 and t[i-1] == 'P'):
            ans[i] = 'D'
        elif t[i+1] == 'D':
            ans[i] = 'P'
        else:
            ans[i] = 'P'
            i += 1
            ans[i] = 'D'
    else:
        ans[i] = t[i]
    i += 1
for i in range(len(t)):
    print(ans[i], end='')
print()

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

Solution (Python):
import numpy as np
t = input()

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

Solution (Python):
T = input()

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

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

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

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

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

Solution (Python):
from statistics import median


from fractions import gcd
from itertools import combinations 
from collections import deque
from collections import defaultdict
import bisect










import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
t = list(input())
lt = len(t)
cnt = 0
for i in range(lt-1,-1,-1):
    if t[i] == 'D':
        pass
    elif t[i] == 'P':
        pass
    elif t[i] == '?':
        if i+1 < lt:
            if t[i+1] == 'D':
                if i-1 < lt:
                    if t[i-1] == 'P':
                        t[i] = 'D'
                    else:
                        t[i] = 'P'
                else:
                    t[i] = 'P'
            elif t[i+1] == 'P':
                t[i] = 'D'
        else:
            t[i] = 'D'
print(*t,sep='')

Solution (Python):
T = input()
N = len(T)
S = [""] * N

for i in range(N - 1, -1, -1):
    if T[i] == "?":
        S[i] = "D"
    else:
        S[i] = T[i]
print("".join(S))

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

Solution (Python):
T = input()
for c in T:
    if c == '?':
        print('D', end='')
    else:
        print(c, end='')
print()

Solution (Python):
T = input()

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

print(t)

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

Solution (Python):
T = input()

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

Solution (Python):
T = input()
arr =[]
for i in range(len(T)):
    arr.append(T[i])
    if arr[-1] == '?':
        arr[-1] = 'D'

print(*arr,sep='')

Solution (Python):
s = list(input())
n = len(s)
ans = ""
for i in range(n):
  temp = s[i]
  if temp == "?":
    temp = "D"
    
  ans += temp
  
print(ans)

Solution (Python):
t = input()

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

Solution (Python):
def main():
    t = input()
    t = t.replace("?", "D")
    print(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()
for i in t:
    if i == '?':
        print('D', end='')
    else:
        print(i, end='')
print()

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

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

Solution (Python):
import sys



if(__name__ == "__main__"):
    Str = input()

    Stred = Str.replace('?', 'D')
    print(Stred)

Solution (Python):


import math
import re
import numpy as np

T = input()

ans = ""

for c in T:
    if c == "?":
        ans += "D"
    else:
        ans += c

print(ans)

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

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

Solution (Python):
def main ():
  return input().replace('?', 'D')

print(main())

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):
t = input()

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

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

Solution (Python):
import sys
input = sys.stdin.readline


def main():
    S = input().strip()
    return S.replace("?","D")

if __name__ == "__main__":
    print(main())

Solution (Python):
import math
from collections import deque
from collections import defaultdict


def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): 
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): 
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} 
def bitArr(n):
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): 
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq

t = readChar()

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

print(t)

Solution (Python):
t = str(input())
l = [0] * len(t)
for i in range(len(t)):
    if t[i] == "?":
        l[i] = "D"
    else:
        l[i] = t[i]
ans = "".join(l)
print(ans)

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

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

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

Solution (Python):
def main():
    t = input()
    pre = t[0]
    for tt in t:
        if tt=='?':
                print('D', end='')
        else:
            print(tt, end='')
    print()
    
    
if __name__ == '__main__':
    main()

Solution (Python):

t=list(input())

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

Solution (Python):
s = str(input())

sl = s.replace("?", "D")

print(sl)

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

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

S=""

for j in range(len(T)):
    S=S+T[j]

print(S)

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

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()


def main():
    T = list(input() + 'E')
    ans = 0
    for i, t in enumerate(T):
        if t == 'P':
            if T[i + 1] == 'D' or T[i + 1] == '?': 
                ans += 1
                T[i + 1] = 'D'
        elif t == 'D':
            ans += 1
        elif t == '?':
            ans += 1
            T[i] = 'D'
    T.pop()
    print("".join(T))




if __name__ == "__main__":
    main()

Solution (Python):
s = input()
ans = [0] * len(s)

for i in range(len(s)):
    if s[i] == "?":
        ans[i] = "D" 
    else:
        ans[i] = s[i]
        
print(*ans, sep="")

Solution (Python):
t = input().rstrip()

s = ''
f = False
for i, tt in enumerate(t):
    if f:
        f = False
        continue
    if t[i] == '?':
        s += 'D'
    else:
        s += tt
print(s)

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

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

Solution (Python):
t=input()

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

print(t)

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

Solution (Python):
t = input()

s = []

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

print(''.join(s))

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
T = S()
print(T.replace('?', 'D'))

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline

""" Input
N = int(input())
N, A, B = map(int, input().split())
A = np.array(input().split(), dtype=np.float64)
D = [int(input()) for _ in range(N)]
AB = [[int(x) for x in input().split()] for _ in range(N)]
PX = [[int(x) for x in input().split()] for _ in range(Q)]
"""

S = input().rstrip()
print(S.replace('?', 'D'))

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    T = list(S())

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

    print(''.join(T))

    
    
    
    
    
    
    
    
    
    


if __name__ == '__main__':
    resolve()

Solution (Python):
s=input()
a=s.replace('?','D')
b=s.count('D')
c=s.count('PD')
print(a)

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

if __name__ == "__main__":
  resolve()

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

if len(T) == 1:
    if T[0] == '?':
        T[0] = 'D'
else:

    if T[0] == '?':
        if T[1] == 'D':
            T[0] = 'P'
        else:
            T[0] = 'D'

    for i in range(1, len(T) - 1):
        if T[i] == '?':
            if T[i - 1] == 'P':
                T[i] = 'D'
            else:
                if T[i + 1] == 'D':
                    T[i] = 'P'
                else:
                    T[i] = 'D'

    if T[-1] == '?':
        T[-1] = 'D'

print(''.join(T))

Solution (Python):
print(''.join(['D' if x == '?' else x for x in input()]))

Solution (Python):
s = input()

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

Solution (Python):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()

from collections import defaultdict, deque, Counter
from sys import exit
import heapq
import math
from fractions import gcd
import copy
from itertools import permutations
from operator import mul
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

from itertools import permutations
from math import factorial, hypot





T = list(input())
N = len(T)
alta = []
for i in range(N):
    if T[i] == "?":
        alta.append('D')
    else:
        alta.append(T[i])
print(''.join(alta))

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 = list(input())

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

for i in range(len(T)):
    print(T[i], end="")

Solution (Python):

n=list(input())

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

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

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