#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int alp[26];
  if (s.size() < 26) {
    cout << -1 << endl;
    return 0;
  }
  memset(alp, 0, sizeof(alp));
  for (int i = 0; i <= 24; i++) {
    if (s[i] != '?') alp[s[i] - 65]++;
  }
  int flag = 0, i = 0, res = 0;
  for (i = 25; i < s.size(); i++) {
    flag = 0;
    if (s[i] != '?') alp[s[i] - 65]++;
    for (int j = 0; j < 26; j++) {
      if (alp[j] > 1) {
        flag = 1;
        break;
      }
    }
    if (flag == 1) {
      if (s[i - 25] != '?') alp[s[i - 25] - 65]--;
    } else {
      res = 1;
      break;
    }
  }
  if (res != 1) {
    cout << -1 << endl;
    return 0;
  }
  for (int j = i - 25; j <= i; j++) {
    if (s[j] == '?') {
      for (int k = 0; k < 26; k++) {
        if (alp[k] == 0) {
          char ch = k + 65;
          s[j] = ch;
          alp[k] = 1;
          break;
        }
      }
    }
  }
  for (int j = 0; j < s.size(); j++) {
    if (s[j] == '?') {
      s[j] = 'A';
    }
  }
  cout << s << endl;
  return 0;
}
