#include <bits/stdc++.h>
using std::map;
using std::queue;
using std::set;
using std::string;
using std::vector;
const double kEps = 10e-8;
const int kMax = 1000;
const int kInf = 1 << 30;
void solve(string& S) {
  int n = S.length();
  if (n < 26) {
    std::cout << -1 << std::endl;
    return;
  }
  bool isPossible = false;
  int frequencies[26];
  for (int i = 0; i + 26 <= n; i++) {
    int count = 0;
    memset(frequencies, 0, sizeof frequencies);
    for (int j = 0; j < 26; j++) {
      char ch = S[i + j];
      if (ch == '?') {
        count++;
      } else {
        frequencies[ch - 'A']++;
      }
    }
    std::stack<char> missing;
    for (int j = 0; j < 26; j++) {
      if (frequencies[j] == 0) {
        missing.push(char(j + 'A'));
      }
    }
    if (int(missing.size()) == count) {
      isPossible = true;
      for (int j = 0; j < 26; j++) {
        if (S[i + j] == '?') {
          S[i + j] = missing.top();
          missing.pop();
        }
      }
      break;
    }
  }
  if (!isPossible) {
    std::cout << -1 << std::endl;
    return;
  }
  for (int i = 0; i < n; i++) {
    if (S[i] == '?') {
      S[i] = 'A';
    }
  }
  std::cout << S << std::endl;
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  string S;
  std::cin >> S;
  solve(S);
  return EXIT_SUCCESS;
}
