#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, j;
  vector<long long> vc;
  set<long long> s;
  set<long long>::iterator it;
  string p;
  cin >> p;
  if (p.size() < 26) {
    cout << "-1";
    return 0;
  }
  for (i = 25; i < p.size(); i++) {
    s.clear();
    long long x = 0;
    for (j = i - 25; j <= i; j++) {
      if (p[j] != '?') s.insert(p[j]);
      if (p[j] == '?') x++;
    }
    long long l = 0;
    if (s.size() + x == 26) {
      for (j = 'A'; j <= 'Z'; j++) {
        char c = j;
        it = s.find(c);
        if (*it != c) {
          vc.push_back(j);
        }
      }
      for (j = 0; j < i - 25; j++) {
        if (p[j] == '?') p[j] = 'A';
      }
      for (j = i + 1; j < p.size(); j++) {
        if (p[j] == '?') p[j] = 'A';
      }
      for (j = i - 25; j <= i; j++) {
        if (p[j] == '?') {
          p[j] = vc[l];
          l++;
        }
      }
      cout << p;
      return 0;
    }
  }
  cout << "-1";
}
