#include <bits/stdc++.h>
using namespace std;
int check[100] = {0};
int missing[100] = {0};
char a[50007];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int i, len, j, flag, no_of_missing, k, ptr, t;
  char ch;
  i = 1;
  while (cin >> ch) {
    a[i++] = ch;
  }
  len = i - 1;
  if (len < 26) {
    cout << "-1";
    return 0;
  }
  no_of_missing = 0;
  for (i = 1; i <= len - 24; i++) {
    flag = 0;
    for (t = 0; t < 100; t++) {
      check[t] = 0;
    }
    for (t = 0; t < 100; t++) {
      missing[t] = 0;
    }
    no_of_missing = 0;
    for (j = i; j < 26 + i; j++) {
      check[a[j]]++;
      if (check[a[j]] > 1 && a[j] != 63) {
        flag = 1;
        break;
      }
    }
    if (flag) {
      continue;
    }
    ptr = 1;
    for (k = 65; k <= 90; k++) {
      if (check[k] == 0) {
        no_of_missing++;
        missing[ptr] = k;
        ;
        ptr++;
      }
    }
    ptr = 1;
    if (no_of_missing > check[63]) {
      continue;
    } else {
      k = 65;
      for (j = i; j < 26 + i; j++) {
        if (a[j] == 63) {
          a[j] = missing[ptr];
          ptr++;
        }
      }
      for (j = 1; j <= len; j++) {
        if (a[j] == 63) {
          a[j] = 65;
        }
        cout << a[j];
      }
      return 0;
    }
  }
  cout << "-1";
  return 0;
}
