#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int i, j, l, r, p = 0, c, q, f = 0;
  cin >> s;
  if (s.length() < 26) {
    cout << -1;
    exit(0);
  }
  for (i = 0; i <= s.length() - 26; i++) {
    vector<int> a(26, 0);
    vector<int> x;
    vector<int> y;
    p = 0;
    c = 0;
    q = 0;
    l = i;
    r = i + 25;
    for (j = l; j <= r; j++) {
      if (s[j] != '?') {
        if (a[s[j] - 'A'] >= 1) {
          p = 1;
          break;
        } else {
          a[s[j] - 'A']++;
          c++;
        }
      } else if (s[j] == '?') {
        q++;
        x.push_back(j);
      }
    }
    if (p == 1) continue;
    if (26 - c == q) {
      for (j = 0; j < 26; j++)
        if (a[j] == 0) y.push_back(j);
      for (j = 0; j < x.size(); j++) {
        s[x[j]] = 65 + y[j];
      }
      f = 1;
    }
  }
  if (f == 0)
    cout << "-1";
  else {
    for (i = 0; i < s.length(); i++)
      if (s[i] == '?') s[i] = 'A';
    cout << s;
  }
}
