#include <bits/stdc++.h>
using namespace std;
int alpha[28];
int main() {
  string str;
  cin >> str;
  if (str.size() < 26) {
    cout << -1 << endl;
    return 0;
  }
  int l = 0;
  int r = 0;
  memset(alpha, -1, sizeof(alpha));
  while (r < str.size()) {
    if (str[r] == '?') {
      if (r - l + 1 == 26) break;
      r++;
      continue;
    }
    if (alpha[str[r] - 'A'] == -1) {
      alpha[str[r] - 'A'] = r;
    } else {
      l = alpha[str[r] - 'A'] + 1;
      memset(alpha, -1, sizeof(alpha));
      r = l;
      alpha[str[r] - 'A'] = r;
    }
    if (r - l + 1 == 26) break;
    r++;
  }
  memset(alpha, 0, sizeof(alpha));
  if (r - l + 1 == 26 && r < str.size()) {
    for (int i = l; i <= r; i++) {
      if (str[i] == '?') continue;
      alpha[str[i] - 'A'] = 1;
    }
    for (int i = l; i <= r; i++) {
      if (str[i] == '?')
        for (int j = 0; j < 26; j++) {
          if (alpha[j] == 0) {
            char c = j + 'A';
            str[i] = c;
            alpha[j] = 1;
            break;
          }
        }
    }
    for (int i = 0; i < str.size(); i++) {
      if (str[i] == '?')
        cout << "A";
      else
        cout << str[i];
    }
  } else {
    cout << -1 << endl;
  }
  return 0;
}
