#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  cin >> s;
  bool ok = false;
  for (int i = 0; i < s.size(); i++) {
    if (s.size() - i < 26) break;
    int j = i;
    vector<int> f(26);
    int qq = 0;
    while (j < s.size() && j - i + 1 <= 26) {
      if (s[j] != '?')
        f[s[j] - 'A']++;
      else
        qq++;
      if (j - i + 1 == 26) break;
      j++;
    }
    int have = 0;
    queue<char> need;
    for (int k = 0; k < 26; k++) {
      if (f[k] > 0)
        have++;
      else
        need.push(char(k + 'A'));
    }
    int want = 26 - have;
    if (want == qq) {
      ok = true;
      for (int k = i; k <= j; k++)
        if (s[k] == '?') {
          s[k] = need.front();
          need.pop();
        }
    }
  }
  if (!ok) {
    puts("-1");
  } else {
    for (auto c : s) {
      if (c == '?')
        cout << 'A' << "";
      else
        cout << c << "";
    }
  }
  return 0;
}
