#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, j, k, count;
  string s = "";
  cin >> s;
  bool f = 1;
  for (i = 0; i < s.size(); i++) {
    bool flag[26] = {0};
    f = 1;
    count = 0;
    for (j = i; j < i + 26; j++) {
      if (s[j] == '?') continue;
      if (!flag[s[j] - 'A']) {
        flag[s[j] - 'A'] = 1;
        count++;
      } else {
        f = 0;
        count = 0;
        break;
      }
    }
    if (f) {
      for (j = i; j < i + 26; j++) {
        if (s[j] == '?') {
          for (k = 0; k < 26; k++) {
            if (!flag[k]) {
              flag[k] = 1;
              s[j] = k + 'A';
              break;
            }
          }
        }
      }
      for (j = 0; j < s.length(); j++) {
        if (s[j] == '?')
          cout << "A";
        else
          cout << s[j];
      }
      break;
    }
  }
  if (!f) cout << "-1" << endl;
}
