#include <bits/stdc++.h>
using namespace std;
int A[26];
int main() {
  string s, t = "#";
  cin >> s;
  if (s.size() < 26) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i <= s.size() - 26; i++) {
    vector<int> v, x;
    for (int j = 0; j < 26; j++) {
      A[j] = 0;
    }
    for (int j = i; j < i + 26; j++) {
      if (s[j] == '?')
        v.push_back(j);
      else
        A[s[j] - 'A'] = 1;
    }
    for (int j = 0; j < 26; j++) {
      if (A[j] == 0) x.push_back(j);
    }
    if (x.size() == 0) {
      t = s;
      break;
    }
    if (v.size() == x.size()) {
      for (int j = 0; j < v.size(); j++) {
        s[v[j]] = (char)(x[j] + 'A');
      }
      t = s;
      break;
    }
  }
  for (int i = 0; i < t.size(); i++) {
    if (t[i] == '?') t[i] = 'A';
  }
  if (t == "#")
    cout << -1;
  else
    cout << t;
  return 0;
}
