#include <bits/stdc++.h>
using namespace std;
map<char, int> mp;
map<char, int> ans;
vector<char> v;
int main() {
  string s;
  cin >> s;
  int len = s.size();
  int cs = 0, qs = 0, h = 0, check = 0, ch = 0;
  if (len < 26) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < len - 25; i++) {
    cs = 0, qs = 0;
    h = 0;
    for (int j = i; j <= i + 25; j++) {
      if (mp[s[j]] == 0 && s[j] != '?') mp[s[j]]++, cs++;
      if (s[j] == '?') qs++;
    }
    if ((qs + cs) == 26) {
      for (int j = i; j <= i + 25; j++) {
        if (s[j] != '?') ans[s[j]] = 1;
      }
      for (char j = 'A'; j <= 'Z'; j++) {
        if (ans[j] == 0) v.push_back(j);
      }
      for (int j = i; j <= i + 25; j++) {
        if (s[j] == '?') s[j] = v[h++];
      }
      check = 1;
      break;
    }
    mp.clear();
    ans.clear();
    v.clear();
  }
  if (check == 0)
    cout << -1 << endl;
  else {
    for (int i = 0; i < len; i++) {
      if (s[i] == '?') s[i] = 'X';
    }
    cout << s << endl;
  }
}
