#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, l, v[30];
  string s;
  int a, b;
  cin >> s;
  l = s.length();
  if (l < 26) {
    printf("-1\n");
    return 0;
  }
  b = 0;
  for (i = 0; i < l - 25; i++) {
    memset(v, 0, sizeof(v));
    a = 1;
    for (j = i; j < i + 26; j++) {
      if (s[j] == '?') {
        continue;
      } else {
        v[s[j] - 'A']++;
      }
      if (v[s[j] - 'A'] >= 2) {
        a = 0;
        break;
      }
    }
    if (a) {
      b = 1;
      for (j = i; j < i + 26; j++) {
        if (s[j] == '?') {
          for (k = 0; k < 26; k++) {
            if (v[k] == 0) {
              s[j] = 'A' + k;
              v[k]++;
              break;
            }
          }
        }
      }
      if (b) {
        break;
      }
    }
  }
  if (b) {
    for (i = 0; i < l; i++) {
      if (s[i] == '?') {
        s[i] = 'A';
      }
    }
    cout << s << endl;
  } else {
    cout << "-1" << endl;
  }
  return 0;
}
