#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  long long left = 0, right = 0, count = 0, req = 0, m = 0;
  int a[26] = {0};
  cin >> s;
  if (s.size() < 26) {
    cout << "-1" << endl;
  } else {
    for (right = 0; right < s.size() && (count + req != 26); right++) {
      if (right - left < 26) {
        if (s[right] == '?')
          req++;
        else if (a[s[right] - 65] == 0)
          count++;
        a[s[right] - 65]++;
      } else {
        if (s[right] == '?')
          req++;
        else if (a[s[right] - 65] == 0)
          count++;
        a[s[right] - 65]++;
        if (s[left] == '?')
          req--;
        else {
          if (a[s[left] - 65] == 1) count--;
          a[s[left] - 65]--;
        }
        left++;
      }
      if (count + req == 26) {
        long long m = 0;
        for (long long i = 0; i < s.size(); i++) {
          if (s[i] == '?') {
            if (i < left)
              cout << char(m + 65);
            else {
              while (a[m] != 0 && m < 25) {
                m++;
              }
              cout << char(m + 65);
              if (m < 25) m++;
            }
          } else {
            cout << s[i];
          }
        }
        cout << endl;
        return 0;
      }
    }
    cout << "-1" << endl;
  }
  return 0;
}
