#include <bits/stdc++.h>
using namespace std;
int getint(int x = 0) {
  scanf("%d", &x);
  return x;
}
long long getll(long long x = 0) {
  scanf("%lld", &x);
  return x;
}
char inp[50050];
int n;
bool ful[26];
int main() {
  scanf("%s", inp);
  n = strlen(inp);
  if (n < 26) {
    printf("-1\n");
    return 0;
  }
  bool solved = false;
  for (int r = 25; r < n; r++) {
    int l = r - 26 + 1;
    bool able = true;
    for (int i = 0; i < 26; i++) ful[i] = false;
    for (int i = l; i <= r; i++)
      if (inp[i] != '?') {
        char c = inp[i] - 'A';
        if (ful[c]) {
          able = false;
          break;
        } else
          ful[c] = true;
      }
    if (able) {
      solved = true;
      for (int i = l; i <= r; i++)
        if (inp[i] == '?') {
          for (int j = 0; j < 26; j++)
            if (ful[j] == false) {
              inp[i] = j + 'A';
              ful[j] = true;
              break;
            }
        }
      for (int i = 0; i < n; i++)
        if (inp[i] == '?') inp[i] = 'A';
      break;
    }
  }
  if (solved)
    printf("%s\n", inp);
  else
    printf("-1\n");
  return 0;
}
