#include <bits/stdc++.h>
using namespace std;
int c[26];
int main() {
  string s;
  cin >> s;
  if (s.length() < 26) {
    cout << -1;
    return 0;
  }
  int f = 0, h = 0;
  for (int i = 0; i < 25; i++) {
    if (s[i] != '?') {
      h += (c[s[i] - 'A'] == 0);
      c[s[i] - 'A']++;
    } else {
      f++;
    }
  }
  for (int i = 25; i < s.length(); i++) {
    if (s[i] != '?') {
      h += (c[s[i] - 'A'] == 0);
      c[s[i] - 'A']++;
    } else {
      f++;
    }
    if (h + f == 26) {
      int o = i - 25;
      for (int j = 0; j < 26; j++) {
        if (c[j] == 0) {
          while (s[o] != '?') o++;
          s[o] = j + 'A';
        }
      }
      for (int j = 0; j < s.length(); j++) {
        if (s[j] == '?') {
          s[j] = 'A';
        }
      }
      cout << s;
      return 0;
    }
    if (s[i - 25] != '?') {
      c[s[i - 25] - 'A']--;
      h -= (c[s[i - 25] - 'A'] == 0);
    } else {
      f--;
    }
  }
  cout << -1;
  return 0;
}
