#include <bits/stdc++.h>
using namespace std;
int main() {
  string ch, s;
  int i = 0;
  cin >> ch;
  if (ch.length() < 26) {
    cout << -1;
    return 0;
  }
  bool flag = 0;
  while (!flag && i <= ch.length() - 26) {
    s = ch.substr(i, 26);
    bool b[26] = {0};
    long long j = 0;
    bool fl = 0;
    while (!fl && j < s.length()) {
      if (s[j] != '?') {
        if (b[s[j] - 65] == 1) fl = 1;
        b[s[j] - 65] = 1;
      }
      j++;
    }
    if (j == 26 && !fl) {
      flag = 1;
      for (int k = 0; k < 26; k++) {
        if (s[k] == '?') {
          long long w = 0;
          while (b[w] == 1) {
            w++;
          }
          b[w] = 1;
          s[k] = (char)w + 65;
        }
      }
      for (int ii = 0; ii < 26; ii++) {
        ch[i + ii] = s[ii];
      }
      for (int ii = 0; ii < ch.length(); ii++)
        if (ch[ii] == '?') ch[ii] = 'A';
      cout << ch;
      return 0;
    }
    i++;
  }
  cout << -1;
  return 0;
}
