#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string x;
  cin >> x;
  if (x.length() < 26) {
    cout << -1 << endl;
    return 0;
  }
  string to = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  int n = x.length();
  for (int i = 0; i < n - 25; i++) {
    string det = x.substr(i, 26);
    int a = 0;
    int arr[27]{};
    for (int i = 0; i < det.length(); i++) {
      if (det[i] == '?') {
        a++;
      } else {
        arr[det[i] - 'A']++;
      }
    }
    bool sin = 1;
    int mis = 0;
    for (int i = 0; i < 26; i++) {
      if (arr[i] > 1) {
        sin = 0;
        break;
      } else if (arr[i] == 0)
        mis++;
    }
    if (sin && mis <= a) {
      for (int j = i; j < i + 26; j++) {
        if (x[j] == '?') {
          for (int k = 0; k < 26; k++) {
            if (arr[k] == 0) {
              arr[k] = 1;
              char t = 'A' + k;
              x[j] = t;
              break;
            }
          }
        }
      }
      for (int j = 0; j < x.length(); j++) {
        if (x[j] == '?') x[j] = 'A';
      }
      cout << x << endl;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}
