#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  if (s.length() < 26) {
    cout << -1 << endl;
    return 0;
  }
  unordered_map<char, int> mp;
  vector<int> in;
  int i, j;
  for (i = 0; i < s.length(); i++) {
    j = i + 25;
    bool f = 0;
    if (j < s.length()) {
      for (int k = i; k <= j; k++) {
        if (s[k] == '?') continue;
        mp[s[k]]++;
        if (mp[s[k]] > 1) {
          for (int l = i; l < k; l++) {
            if (s[l] == s[k]) {
              i = l;
              break;
            }
          }
          f = 1;
          mp.clear();
          break;
        }
      }
      if (f == 0) break;
    } else
      break;
  }
  if (j < s.length()) {
    for (int k = 0; k < s.length(); k++) {
      if (s[k] == '?' && k >= i && k <= j) {
        for (char ch = 'A'; ch <= 'Z'; ch++) {
          if (mp[ch] == 0) {
            cout << ch;
            mp[ch]++;
            break;
          }
        }
      } else if (s[k] == '?' && (k < i || k > j))
        cout << 'A';
      else
        cout << s[k];
    }
  } else
    cout << -1 << endl;
  return 0;
}
