#include <bits/stdc++.h>
using namespace std;
string s;
int last[26];
bool corr;
deque<int> mark;
int temp, howmany;
int main() {
  ios_base::sync_with_stdio(0);
  for (int i = 0; i <= 25; i++) last[i] = -30;
  cin >> s;
  if (s.length() < 26) {
    cout << "-1\n";
    return 0;
  }
  for (int i = 0; i < s.length(); i++) {
    temp = 0;
    if (s[i] == '?') {
      if (corr) {
        continue;
      }
      mark.push_back(i);
      howmany++;
    } else {
      last[s[i] - 'A'] = i;
    }
    if (i >= 26) {
      if (s[i - 26] == '?') {
        mark.pop_front();
        howmany--;
      }
    }
    for (int j = 0; j <= 25; j++) {
      if (last[j] < i - 25) {
        temp++;
      }
    }
    if (temp <= howmany) {
      corr = 1;
      for (int j = 0; j <= 25; j++) {
        if (last[j] < i - 25) {
          s[mark.front()] = 'A' + j;
          mark.pop_front();
        }
      }
      break;
    }
  }
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '?') s[i] = 'A';
  }
  if (!corr) {
    cout << "-1\n";
    return 0;
  }
  cout << s << "\n";
  return 0;
}
