#include <bits/stdc++.h>
using namespace std;
void printArray(int a[], int n) {
  for (int i = 0; i < n; ++i) {
    cout << a[i] << " ";
  }
  cout << endl;
}
int main() {
  string s;
  cin >> s;
  int a[26] = {};
  bool found = false;
  int i = 0, n = s.length();
  while (i < n - 26 + 1) {
    int qcount = 0, scount = 0;
    for (int j = 0; j < 26; ++j) {
      a[j] = 0;
    }
    for (int j = 0; j < 26; j++) {
      if (s[i + j] != '?') {
        if (a[(int)(s[i + j] - 'A')] == 0) {
          scount++;
        }
        a[(int)(s[i + j] - 'A')]++;
      } else {
        qcount++;
      }
    }
    if (scount + qcount == 26) {
      found = true;
      vector<int> b;
      for (int j = 0; j < 26; ++j) {
        if (a[j] == 0) {
          b.push_back(j);
        }
      }
      int k = 0;
      for (int j = 0; j < 26; ++j) {
        if (s[i + j] == '?') {
          s[i + j] = (char)('A' + b[k++]);
        }
      }
      break;
    }
    i++;
  }
  if (found) {
    for (int i = 0; i < n; ++i) {
      if (s[i] == '?') {
        s[i] = 'A';
      }
    }
    cout << s;
  } else {
    cout << "-1";
  }
}
