#include <iostream>
#include <string>

using namespace std;

int main(const int, const char **)
{
  string s;
  cin >> s;

  size_t pos = 0;
  while ((pos = s.find("??", pos)) != string::npos) {
    s[pos] = 'P'; s[pos+1] = 'D';
    pos += 2;
  }
  pos=0;
  while ((pos = s.find("?D", pos)) != string::npos) {
    s[pos] = 'P';
    pos += 2;
  }
  for (size_t i = 0; i < s.size(); ++i) {
    if (s[i] == '?' ) s[i] = 'D';
  }

  cout << s << endl;
  return 0;
}
