#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int a[256] = {0}, i, j = 0;
  char k;
  cin >> s;
  bool booo;
  for (i = 0; i < s.size(); i++) {
    if (s[i] != '?') {
      a[s[i]]++;
      while (a[s[i]] > 1) {
        if (s[j] != '?') a[s[j]]--;
        j++;
      }
    }
    if (i - j == 25) {
      for (k = 'A'; j <= i; j++)
        if (s[j] == '?') {
          while (a[k] > 0) k++;
          s[j] = k;
          a[k]++;
        }
      for (int j = 0; j < s.size(); j++)
        if (s[j] == '?') s[j] = 'A';
      cout << s;
      return 0;
    }
  }
  cout << -1;
}
