#include <bits/stdc++.h>
using namespace std;
bool a[30];
int main() {
  string s;
  cin >> s;
  bool k = true;
  for (int i = 0; i < (int)s.size() - 25; i++) {
    k = false;
    for (int j = i; j < i + 26; j++) {
      if (s[j] != '?') {
        if (a[s[j] - 'A']) {
          k = true;
          break;
        }
        a[s[j] - 'A'] = 1;
      }
    }
    if (!k) {
      vector<int> v;
      for (int j = 0; j < 26; j++) {
        if (a[j] == 0) {
          v.push_back(j);
        }
      }
      int x = 0;
      for (int j = i; j < i + 26; j++) {
        if (s[j] == '?') {
          s[j] = (v[x] + 'A');
          x++;
        }
      }
      break;
    }
    for (int j = 0; j < 30; j++) {
      a[j] = 0;
    }
  }
  if (!k) {
    for (int i = 0; i < s.size(); i++) {
      if (s[i] == '?') {
        s[i] = 'A';
      }
    }
    cout << s << endl;
  } else {
    cout << "-1\n";
  }
  return 0;
}
