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

import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [Scanner.string() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [Scanner.int() for i in range(n)]


class Math():
    @staticmethod
    def gcd(a, b):
        if b == 0:
            return a
        return Math.gcd(b, a % b)

    @staticmethod
    def lcm(a, b):
        return (a * b) // Math.gcd(a, b)

    @staticmethod
    def divisor(n):
        res = []
        i = 1
        for i in range(1, int(n ** 0.5) + 1):
            if n % i == 0:
                res.append(i)
                if i != n // i:
                    res.append(n // i)
        return res

    @staticmethod
    def round_up(a, b):
        return -(-a // b)

    @staticmethod
    def is_prime(n):
        if n < 2:
            return False
        if n == 2:
            return True
        if n % 2 == 0:
            return False
        d = int(n ** 0.5) + 1
        for i in range(3, d + 1, 2):
            if n % i == 0:
                return False
        return True


def pop_count(x):
    x = x - ((x >> 1) & 0x5555555555555555)
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f
    x = x + (x >> 8)
    x = x + (x >> 16)
    x = x + (x >> 32)
    return x & 0x0000007f


MOD = int(1e09) + 7
INF = int(1e15)


def solve():
    T = Scanner.string()
    N = len(T)
    T = T.replace('?', 'D')
    print(T)


def main():
    
    
    solve()


if __name__ == "__main__":
    main()

Solution (Python):

import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

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

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

S = input().rstrip()
T = ""
for s in S:
    if s == "?":
        T += "D"
    else:
        T += s
print(T)

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

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

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

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): 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 LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def main():
    s=SI()
    ans="".join("P" if c=="P" else "D" for c in s)
    print(ans)

main()

Solution (Python):
def LI():return list(map(int,input().split()))
def yes():print("Yes")
def no():print("No")





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

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

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

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

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

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    t = input()

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


if __name__ == '__main__':
    main()

Solution (Python):
from sys import stdin


def main():
    _in = [_.rstrip() for _ in stdin.readlines()]
    T =     _in[0]   
    
    T = T.replace('?','D')
    
    
    print(T)


if __name__ == "__main__":
    main()

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

sys.setrecursionlimit(10 ** 7)

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

T = list(input())

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

print("".join(T))

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

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    T = readline().decode('utf-8').strip()
    ans = T.replace('?','D')
    print(ans)
if __name__ == '__main__':
    main()

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

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

main()

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()
print(S.replace('?', 'D'))

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

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    T = input().rstrip()
    ans = []
    for t in T:
        if t == "?":
            ans.append("D")
        else:
            ans.append(t)
    print("".join(ans))

if __name__ == '__main__':
    main()

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

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

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 math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  s=S()
  s=s.replace('?','D')

  return s


print(main())

Solution (Python):
T = input()

ans = []

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

Solution (Python):
from collections import deque, Counter, defaultdict
from itertools import chain, combinations
import json

import bisect
import sys
import math
import bisect
from functools import lru_cache
import itertools

sys.setrecursionlimit(10 ** 8)

M = 10 ** 9 + 7
INF = 10 ** 17


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


if __name__ == "__main__":
    main()

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

print(*ans,sep='')

Solution (Python):
import sys
sys.setrecursionlimit(1000000000)
import math
from math import gcd
def lcm(a, b): return a * b // gcd(a, b)
from itertools import count, permutations, chain
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok

def get_inv(n, modp):
    return pow(n, modp-2, modp)

def factorials_list(n, modp):    
    fs = [1]
    for i in range(1, n+1):
        fs.append(fs[-1] * i % modp)
    return fs

def invs_list(n, fs, modp):     
    invs = [get_inv(fs[-1], modp)]
    for i in range(n, 1-1, -1):
        invs.append(invs[-1] * i % modp)
    invs.reverse()
    return invs

def comb(n, k, modp):
    num = 1
    for i in range(n, n-k, -1):
        num = num * i % modp
    den = 1
    for i in range(2, k+1):
        den = den * i % modp
    return num * get_inv(den, modp) % modp

def comb_from_list(n, k, modp, fs, invs):   
    return fs[n] * invs[n-k] * invs[k] % modp



class UnionFindEx:
    def __init__(self, size):
        
        self.roots = [-1] * size
    def getRootID(self, i):
        r = self.roots[i]
        if r < 0:   
            return i
        else:
            r = self.getRootID(r)
            self.roots[i] = r
            return r
    def getGroupSize(self, i):
        return -self.roots[self.getRootID(i)]
    def connect(self, i, j):
        r1, r2 = self.getRootID(i), self.getRootID(j)
        if r1 == r2:
            return False
        if self.getGroupSize(r1) < self.getGroupSize(r2):
            r1, r2 = r2, r1
        self.roots[r1] += self.roots[r2]    
        self.roots[r2] = r1
        return True

Yes = 'Yes'
No = 'No'


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







main()

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

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

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

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

Solution (Python):
from copy import copy, deepcopy
from collections import Counter
from math import sqrt, floor, factorial
from itertools import permutations, combinations, combinations_with_replacement
from operator import mul
from functools import reduce
import bisect

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

S = input()
S = S.translate(str.maketrans("?", "D"))
print(S)

Solution (Python):

import sys
input = sys.stdin.readline

t = input().rstrip()
ans = []
for ch in t:
    if ch is not "?":
        ans.append(ch)
    else:
        ans.append("D")
print("".join([item for item in ans]))

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

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

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

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

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

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

print(''.join(T))

Solution (Python):
t=input()

ans=[]

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

print("".join(ans))

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

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

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

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

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

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

print(''.join(s))

Solution (Python):
T = input()

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

T = input()

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

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

Solution (Python):
t = 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):
def main():
    T = input()
    return T.replace('?', 'D')
    

print(main())

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

Solution (Python):
T = input()

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

print(T)

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

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

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

Solution (Python):
if __name__ == '__main__':
    from sys import stdin
    
    
    
    
    
    
    input = stdin.readline

    t = input()[:-1]
    print(t.replace('?', 'D'))

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

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

Solution (Python):

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

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

if __name__ == "__main__":
    T = input()
    print(solve(T))

Solution (Python):
def examA():
    H1, M1, H2, M2, K = LI()
    T = (H2-H1)*60 + (M2-M1)
    ans = T-K
    print(ans)
    return

def examB():
    T = SI()
    ans = ""
    for t in T:
        if t=="?":
            ans += "D"
        else:
            ans += t
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examB()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

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

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

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

s = "".join(t)
print(s)

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
s=SI()
for i in range(len(s)):
    if s[i]=="?":
        print("D",end="")
    else:
        print(s[i],end="")

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

Solution (Python):
T=input()
for i in T:
    if i=="P":
        print("P",end="")
    else:
        print("D",end="")

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


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

    ans = []
    for s in S:
        if s == '?':
            ans.append("D")
        else:
            ans.append(s)

    print("".join(ans))

    
    

if __name__ == '__main__':
    main()

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

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

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

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):
s = input()
print(s.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"
print("".join(T))

Solution (Python):
import sys
import math
import collections
from collections import deque
from functools import reduce
import heapq


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

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

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

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

ans = []
for s in T:
    if s == "?":
        ans.append("D")
    else:
        ans.append(s)
print("".join(ans))

Solution (Python):
T = input()

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

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

Solution (Python):
import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(500000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

y=list(input())
for i in range(len(y)):
    if y[i]=="?":
        y[i]="D"

print("".join(y))

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

Solution (Python):
from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt
import math

import bisect
import re
import heapq


from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


yes = "Yes"
no = "No"


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



main()

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

Solution (Python):
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

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

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

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

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    T = rl().rstrip()
    
    ans = []
    for ti in T:
        if ti == '?':
            ans.append('D')
        else:
            ans.append(ti)
    print(''.join(ans))


if __name__ == '__main__':
    solve()

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

Solution (Python):
def main():
    T=input()
    ans=""
    for t in T:
        if t=="?":
            ans+="D"
        else:
            ans+=t
    print(ans)
if __name__ == '__main__':
    main()

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

for e,i in enumerate(a):
    if i == '?':
        a[e] = 'D'

print("".join(a))

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10, gcd
from itertools import permutations, combinations, product, accumulate, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 1, 0, -1, 1, -1, -1, 1]
dy = [1, 0, -1, 0, 1, -1, 1, -1]
debugmode = True

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

Solution (Python):
import sys
sys.setrecursionlimit(700000)

def s_in():
    return input()

def n_in():
    return int(input())

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

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

Solution (Python):


def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    T=list(input())
    
    N=len(T)
    for i in range(N):
        if T[i]=="?":
            T[i]="D"
            
    print(''.join(map(str, T)))

main()

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

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

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

u = ''.join(u)
print(u)

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

print("".join(ans))

Solution (Python):


import sys






























def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    s = input()
    print(s.replace('?', 'D'))


if __name__ == "__main__":
    main()

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

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

Solution (Python):
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy

if __name__ == "__main__":
    t = input()
    cnt1 = 0
    a = t.replace("?","D")
    cnt1 = a.count("D") + a.count("PD")
    b = t.replace("?","P")
    cnt2 = b.count("D") + b.count("PD")
    if cnt1>cnt2:
        print(a)
    else:
        print(b)

Solution (Python):
import sys
INF = 1 << 60
MOD = 10**9 + 7 
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    T = input()
    res = [c if c != '?' else 'D' for c in T]
    print(''.join(res))
resolve()

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

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

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

Solution (Python):
T = input()

S = ''

for t in T:
    if t == '?':
        S += 'D'
    else:
        S += t

print(S)

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

Solution (Python):
def main():
    T = input()
    l = ''
    for i in T:
        if i == 'P':
            l += 'P'
        else:
            l += 'D'
    return l
print(main())

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 6)

def int1(x): return int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def SI(): return input().split()

def printlist(lst, k='\n'): print(k.join(list(map(str, lst))))
INF = float('inf')

from math import ceil, floor, log2
from collections import deque
from itertools import combinations as comb, combinations_with_replacement as comb_w, accumulate, product
from heapq import heapify, heappop, heappush


def solve():
    T = list(input())

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



if __name__ == '__main__':
    solve()

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

T=input().strip()

for t in T:
    if t!="P":
        print("D",end="")
    else:
        print("P",end="")
print()

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

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

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

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

T = readline().strip()

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

print(''.join(S))

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

Solution (Python):
import sys
sys.setrecursionlimit(10**8)
def ii(): 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 dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]





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











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    print(ST().replace("?","D"))
if __name__ == '__main__':
    main()

Solution (Python):
import sys
input=sys.stdin.readline
t=input().rstrip()
for i in t:
    if i=='P':
        print('P',end='')
    else:
        print('D',end='')