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

print(''.join(poe))

Solution (Python):
import math

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

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

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

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

Solution (Python):
def main() -> None:
    t = input()

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

    return


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    T = input()
    len_t = len(T)
    S = ""
    for t in T:
        if t == "?":
            S += "D"
        else:
            S += t
    print(S)


if __name__=='__main__':
    main()

Solution (Python):

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

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

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

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

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

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

Solution (Python):
import sys
input=sys.stdin.readline
count=0
res=""
str=input()
list=[]
for i in range(len(str)):
  list.append(str[i])
for i in range(len(str)):
  if str[i]=="?":
    if i==0:
      if list[1]=="D":
        list[0]="P"
      else:
        list[0]="D"
    elif i+1==len(str):
      list[i]="D"
    else:
      if list[i-1]=="P":
        list[i]="D"
      else:
        if list[i+1]=="D" or list[i+1]=="?":
          list[i]="P"
        else:
          list[i]="D"
for i in range(len(str)):
  res+=list[i]
print(res)

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

Solution (Python):
t = input()

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

print(t)

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):
s=input()
s=s.replace("?","D")
print(s)

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

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

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

Solution (Python):
t=list(map(str,input().split()))
T=[]
for i in range(len(t[0])):
    T.append(t[0][i])
for i in range(len(T)):
    if T[i]=='?':
        T[i]='D'
U="".join(T)
print(U)

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

Solution (Python):
S=input()
print(S.translate(str.maketrans( {'?': '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()
for i in range(len(t)):
    if t[i] == "?":
        print("D",end="")
    else:
        print(t[i],end="")
print()

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

Solution (Python):
T = input()

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

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

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

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

Solution (Python):
def main():
    S = input()
    ans = [s if s != '?' else 'D' for s in S]
    print(''.join(ans))

if __name__ == '__main__':
    main()

Solution (Python):
T=input()
S=""
if T[0]=="?":
  S+="D"
else:
  S+=T[0]
for x in range(1,len(T)):
  if T[x]=="?":
    S+="D"
  else:
    S+=T[x]
print(S)

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

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

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

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

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

Solution (Python):
T=input()

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

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

Solution (Python):
t = input()

ans = ""

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

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

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

res = ''

for i in range(n):
    if t[i] == '?':
        res += 'D'
    else:
        res += t[i]
print(res)

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

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

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

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

Solution (Python):
T=input()
ans=[]
for i in range(len(T)):
    if T[i]=='P':
        ans.append('P')
    elif T[i]=='D':
        ans.append('D')
    else:
        ans.append('D')

print(''.join(ans))

Solution (Python):
import re
T = input()
print(re.sub(r'\?', 'D', T))

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

Solution (Python):
T = input()

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

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

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

Solution (Python):
import sys
def Ii():return int(sys.stdin.buffer.read())
def Mi():return map(int,sys.stdin.buffer.readline().split())
def Li():return list(map(int,sys.stdin.buffer.readline().split()))

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

Solution (Python):
text = input()
data = []

for i in text:
  data.append(i)


for d in range(0,len(text)):
  if data[d] == "?":
    data[d] = "D"

ans = ''.join(data)

print(ans)

Solution (Python):
text = input()
data = []
for i in text:
  data.append(i)

for d in range(0,len(text)):
  if data[d] == "?":
    data[d] = "D"
ans = ''.join(data)
print(ans)

Solution (Python):
T = input()

res = ""
for t in T:
    if t == "?":
        res += "D"
    else:
        res += t

print(res)

Solution (Python):
S = input()

while 1:
    bef = S
    bef = bef.replace("?", "D")
    if S==bef:
        break
    S = bef
    
print(S)

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

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

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

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

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

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

Solution (Python):
from sys import stdin
T = stdin.readline().rstrip()
print(T.replace('?', 'D'))

Solution (Python):
input = input()

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

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

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

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

Solution (Python):
s = input()

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

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

Solution (Python):
def resolve():
    T = input()
    S = ""
    for i in range(len(T)):
        if T[i] == "D" or T[i] == "?":
            S += "D"
        else:
            S += "P"
    print(S)
resolve()

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

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

Solution (Python):
t = input()
ans = t.replace('?','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):
print(input().replace('?', 'D'))

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

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

Solution (Python):
T = list(input())
N = len(T)
count = 0
for i in range(N):
    if T[i] == '?':
        T[i] = 'D'
    if (i < N - 1) and T[i] == 'P' and T[i + 1] == 'D':
        count += 1
    elif T[i] == 'D':
        count += 1


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

Solution (Python):
T = input()

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

Solution (Python):

"""NOMURA プログラミングコンテスト 2020: B - Postdocs
https://atcoder.jp/contests/nomura2020/tasks/nomura2020_b
"""


def main():
    T = input()

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


if __name__ == '__main__':
    main()

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

print(ans)

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

Solution (Python):

a = input()
k = a.replace("?","D")
print(k)

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

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

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

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

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

Solution (Python):
t = input()

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

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

Solution (Python):
s = input()
ans = ''
for i in range(len(s)):
  s_i = s[i]
  if s_i == '?':
      ans += 'D'
      continue
  ans += s_i
print(ans)

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

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

cnt=0
before_i=''
for i in list(T):
    if i == 'D':
        cnt+=1
        if before_i=='P':
            cnt+=1
        before_i='D'
    else:
        before_i='P'

print(T)

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

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

Solution (Python):


S = input()
SS = S.replace("?", "D")
print(SS)

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

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

print(readline().rstrip().replace("?","D"))

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

Solution (Python):
a = list(map(str, input().strip()))

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

Solution (Python):
s = input()
a = [str(c) for c in s]
 
for i in range (len(a)-1):
	if a[i]=='?':
		if i!=0 and a[i-1]=='P':
			a[i]='D'
		elif a[i+1]=='D' or a[i+1]=='?':
			a[i]='P'
		else:
			a[i]='D'
if a[len(a)-1]=='?':
	a[len(a)-1]='D'
print(*a,sep='')

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


def main():
    t = readline().rstrip()
    print(t.replace("?", "D"))


if __name__ == '__main__':
    main()

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

Solution (Python):
t = list(input())
a = 0
b = 0

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

    if i == len(t) -1 and t[i] == '?':
        t[i] = 'D'

print(''.join(t))

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

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


if __name__ == "__main__":
    main()

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

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

Solution (Python):
def resolve():
    S = input()
    s = [ "P" if i =="P" else "D"   for i in S]
    print("".join(s))
resolve()

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

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

Solution (Python):
T = input()

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


print(r_T)

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

Solution (Python):
import re
string = input()
string = re.sub("P\?", "PD", string)
string = re.sub("\?\?\?", "DDD", string)
string = string.replace("?", "D")
print(string)

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

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

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

Solution (Python):
def generate_max_PPD_str(T):
  
  return T.replace("?","D")

T = input()
ans = generate_max_PPD_str(T)
print(ans)

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

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

print(T)

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


if __name__ == '__main__':
    solve()

Solution (Python):
t = input()
answer = []
for idx, w in enumerate(t):
    if w in ['P', 'D']:
        answer.append(w)
    else:
        if len(answer) != 0 and answer[-1] == 'P':
            answer.append('D')
        else:
            if idx == len(t) - 1:
                answer.append('D')
            elif t[idx + 1] in ['D', '?']:
                answer.append('P')
            else:
                answer.append('D')
print(''.join(answer))

Solution (Python):
import itertools
import decimal
import math
import collections
import sys
input = sys.stdin.readline

T=input()

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

print(T)

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

Solution (Python):



def main():
    t = input()
    words = ''

    for ti in t:
        if ti == '?':
            words += 'D'
        else:
            words += ti

    print(words)


if __name__ == '__main__':
    main()

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

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

try:
    for i in range(len(T)):
        if T[i] == '?':
            if T[i-1] == 'P' or T[i-1] == 'D':
                T[i] = 'D'
            elif T[i-1] == 'D' and T[i+1] == '?':
                T[i] = 'P'
            else:
                T[i] = 'D'
except IndexError:
    T[-1] = 'D'


for t in T:
    print(t,end='')

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

print(t)

Solution (Python):
def find(S):
    ans = []
    for x in S:
        if x == "?":
            ans+=["D"]
        else:
            ans+=[x]
    return "".join(ans)
print(find(input()))

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

PDind = ''
for i in T:
  if (i == 'D') or (i == 'P'):
    PDind += i
    
  else:
    PDind += 'D'
    
print(PDind)

Solution (Python):
T=input()
ans=""
if T=="?":
    print("D")
    exit()

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

Solution (Python):
import math

char = str(input())

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

print(char)

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

print(''.join(ans))

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

Solution (Python):



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

if __name__ == '__main__':
    main()

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

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

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

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

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

print(''.join(t))

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

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

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

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

print(''.join(ans))

Solution (Python):
T = input()
line = [c for c in T]

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

print("".join(line))

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

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

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

Solution (Python):
s=raw_input()
t=[]

for x in s:
	if x=='?':
		t.append('D')
	else:
		t.append(x)

print "".join(t)

Solution (Python):
T = input()


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

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

Solution (Python):
s = input()
a = []

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

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

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

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

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

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

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

Solution (Python):
import sys


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(20000000)

MOD = 10 ** 9 + 7
INF = float("inf")


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


if __name__ == "__main__":
    main()

Solution (Python):
t = list(input())    
for i in range(len(t)):

  if t[i] == '?':
    if len(t) == 1:
      if t[i] == '?':
        t[i] = 'D'
      break
    if i == 0:
      if t[1] == 'P':
        t[i] = 'D'
      else:
        t[i] = 'P'
    if i == len(t)-1:
        t[i] = 'D'
    else:
      if t[i-1] == 'P':
        t[i] = 'D'
      else:
        if t[i+1] == 'P':
          t[i] = 'D'
        else:
          t[i] = 'P'
a = ''
for i in range(len(t)):
  a += t[i]
        
print(a)

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

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

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

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

Solution (Python):
import math
import re
import copy

t = input()
ans = t.replace("?","D")
print(ans)

Solution (Python):

t = input()

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

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

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

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

Solution (Python):
T = input()

for word in T:
  if word == '?':
    print('D', end='')
  else:
    print(word, end='')

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

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

t = list(input())
t.pop()
n = len(t)

res = 0
for i in range(n):
    if t[i] == '?':
        t[i] = 'D'

print(''.join(t))

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

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

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

Solution (Python):
import sys











stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

def main():
    t = str(stdin.readline().rstrip())
    print(t.replace("?","D"))

main()

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

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

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

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

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

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

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

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

print(ans)

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

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

Solution (Python):
t=input()
ans=str()
tmp=""
for s in t:
    if s=="P" or s=="D":
        ans+=s
        tmp=s
    else:
        ans+="D"
        tmp="D"

print(ans)

Solution (Python):
import math

s = list(input()[::-1])

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

print("".join(s[::-1]))

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

Solution (Python):
s = input()

return_str = ''
for c in s:
  if(c == '?'):
    return_str += 'D'
  else:
    return_str += c
    
print(return_str)

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

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

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

if __name__ == "__main__":
    resolve()

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

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline
from collections import defaultdict
from heapq import heappop, heappush

from decimal import *





































def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007




def main():
	T = inputStr()

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






def bisect_left_reverse(a, x):
    if a[0] <= x:
        return 0
    if x < a[-1]:
        return len(a)
    
    ok = len(a) - 1
    ng = 0
    while (abs(ok - ng) > 1):
        mid = (ok + ng) // 2
        if a[mid] <= x:
            ok = mid
        else:
            ng = mid
    return ok

def bisect_right_reverse(a, x):
    if a[0] < x:
        return 0
    if x <= a[-1]:
        return len(a)
    
    ok = len(a) - 1
    ng = 0
    while (abs(ok - ng) > 1):
        mid = (ok + ng) // 2
        if a[mid] < x:
            ok = mid
        else:
            ng = mid
    return ok





def binary_search(list, item):
    low = 0
    high = len(list) - 1

    while low <= high:
        mid = (low + high) //2
        guess = list[mid]
        if guess == item:
            return mid
        if guess > item:
            high = mid -1
        else:
            low = mid + 1
    return None




def sunuke(N, K, mod=10**9+7):
	if N < K or K-1 < 0:
		return 0
	else:
		return combination(N-1, K-1, mod)




def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y




def H(n, r, mod=10**9+7):
	
	
    return combination(n+r-1, r, mod)


class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        
        
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv



def dfs(graph,parent,counter,edge):
    stk = []
    stk.append(edge)
    while len(stk) > 0:
        p = stk.pop()
        for e in graph[p]:
            if parent[p] == e:
                continue
            else:
                parent[e] = p
                counter[e] += counter[p]
                stk.append(e)



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


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

answer = "".join(str(n) for n in t)

print(answer)

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

Solution (Python):
T = input()

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

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

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

Solution (Python):
t = input()
n = len(t)
moji = ""
res = ""
if t[-1] ==  "?":
    moji = "P"
    
for i in range(n-1, 0, -1):
    if t[i] == "?":
        if moji == "D" and t[i -1] == "D":
            res += "P"
        elif moji == "P" or moji == "D" and t[i -1] == "P" :
            res += "D"           
        elif moji == "D"  and t[i -1] == "?" :
            res += "P"
           
    else:
        res += t[i]
    moji = res[-1]
if t[0] ==  "?":
    if moji == "P":
        res += "D"
    else:
        res += "P"
else:
    res += t[0]

res = res[::-1]
print(res)

Solution (Python):
t = input()
n = len(t)
moji = ""
res = ""
if t[-1] ==  "?":
    moji = "P"
    
for i in range(n-1, 0, -1):
    if t[i] == "?":
        if moji == "D" and t[i -1] == "D":
            res += "P"
        elif moji == "P" or moji == "D" and t[i -1] == "P" :
            res += "D"
        elif moji == "P"  and t[i -1] == "?" :
            res += "D"            
        elif moji == "D"  and t[i -1] == "?" :
            res += "P"
           
    else:
        res += t[i]
    moji = res[-1]
if t[0] ==  "?":
    if moji == "P":
        res += "D"
    else:
        res += "P"
else:
    res += t[0]

res = res[::-1]
print(res)

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

if __name__ == '__main__':
    main()

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=input()
print(t.replace("?","D"))

Solution (Python):



def ri():
    return int(input())

def rl():
    return list(input().split())

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

def main():
    t = input()
    bef = '!'
    s = ""
    for c in t:
        nc = c
        if c == '?':
            nc = "D"
        bef = nc
        s += nc
    print(s)



if __name__ == '__main__':
    main()

Solution (Python):
T = input()

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

print(ans)

Solution (Python):
t=input()

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

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



def linput(_t=int):
    return list(map(_t, input().split()))

def gcd(n,m):
    while m: n,m = m, n%m
    return n

def lcm(n,m): return n*m//gcd(n,m)

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

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

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

ans = ""

for s in seq:
    if s == "?":
        ans += "D"
    else:
        ans += s

print(ans)

Solution (Python):



T = list(input())
T_len = len(T)


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


print("".join(T))

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

Solution (Python):
S = input()

L = len(S)
S = S.replace("?", "D")

print(S)

Solution (Python):


import sys
import math
import collections
import itertools
import bisect
INF = 10 ** 13
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return x if y == 0 else gcd(y, x%y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def LS() : return input().split()
def RS(N) : return [input() for _ in range(N)]
def LRS(N) : return [input().split() for _ in range(N)]
def PL(L) : print(*L, sep="\n")
def YesNo(B) : print("Yes" if B else "No")
def YESNO(B) : print("YES" if B else "NO")

T = input()

for t in T:
    if t == '?':
        print('D', end='')
    else:
        print(t, end='')

print()