#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
string s;
bool check(int i) {
  unordered_map<char, int> fr;
  for (int x = 0; x < 26; ++x) {
    if (s[i + x] == '?') continue;
    ++fr[s[i + x]];
    if (fr[s[i + x]] > 1) return 0;
  }
  return 1;
}
void doIt(int i) {
  char act = 'A';
  unordered_map<char, int> fr;
  for (int x = 0; x < 26; ++x) {
    if (s[i + x] == '?') continue;
    ++fr[s[i + x]];
  }
  for (int x = 0; x < 26; ++x) {
    if (s[i + x] == '?') {
      while (fr[act] > 0) ++act;
      s[i + x] = act;
      ++fr[act];
    }
  }
  for (int i = 0; i < s.size(); ++i)
    if (s[i] == '?') s[i] = act;
  cout << s << '\n';
}
int main() {
  cin >> s;
  for (int i = 0; i + 25 < s.size(); ++i) {
    if (check(i)) {
      doIt(i);
      return 0;
    }
  }
  cout << "-1\n";
  return 0;
}
