#include <bits/stdc++.h>
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
int main() {
  string s;
  set<char> full;
  cin >> s;
  for (char a = 'A'; a <= 'Z'; ++a) {
    full.insert(a);
  }
  int n = s.length();
  for (int i = 0; i <= n - 26; ++i) {
    int jokers = 0;
    set<char> chars;
    for (int j = i; j < i + 26; ++j) {
      if (s.at(j) == '?') {
        jokers++;
        continue;
      }
      chars.insert(s.at(j));
    }
    if (chars.size() + jokers == 26) {
      set<char> joker_set;
      for (auto it = full.begin(); it != full.end(); ++it) {
        if (chars.find(*it) == chars.end()) joker_set.insert(*it);
      }
      vector<char> joker_vec;
      std::copy(joker_set.begin(), joker_set.end(), back_inserter(joker_vec));
      int p = 0;
      for (int j = 0; j < i; ++j) printf("%c", s.at(j) == '?' ? 'A' : s.at(j));
      for (size_t j = i; j < i + 26; ++j) {
        if (s.at(j) == '?')
          printf("%c", joker_vec[p++]);
        else
          printf("%c", s.at(j));
      }
      for (int j = i + 26; j < s.length(); ++j)
        printf("%c", s.at(j) == '?' ? 'A' : s.at(j));
      puts("");
      return 0;
    }
  }
  printf("-1\n");
  return 0;
}
