#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  string s;
  int wc, nc;
  bool c[26], d = 0;
  cin >> s;
  if (((int)(s).size()) < 26) {
    cout << "-1" << endl;
    return 0;
  }
  for (int i = (0); i < (((int)(s).size()) - 26 + 1); i++) {
    memset(c, 0, sizeof(c));
    wc = nc = 0;
    for (int j = (i); j < (i + 26); j++) {
      if (s[j] == '?') {
        wc++;
      } else if (!c[s[j] - 'A']) {
        c[s[j] - 'A'] = 1;
        nc++;
      } else
        break;
    }
    if (nc + wc == 26) {
      d = 1;
      for (int j = (i); j < (i + 26); j++) {
        if (s[j] == '?') {
          for (int k = (0); k < (26); k++)
            if (!c[k]) {
              s[j] = (char)('A' + k);
              c[k] = 1;
              break;
            }
        }
      }
      break;
    }
  }
  if (!d) {
    cout << "-1" << endl;
    return 0;
  }
  for (int i = (0); i < (((int)(s).size())); i++) {
    if (s[i] == '?') s[i] = 'X';
  }
  cout << s << endl;
  return 0;
}
