#include <bits/stdc++.h>
using namespace std;
char str[50000];
int b[27];
int main() {
  while (scanf("%s", str) != EOF) {
    int len = strlen(str);
    int flag = 1;
    if (len < 26) {
      printf("-1\n");
      continue;
    }
    memset(b, 0, sizeof(b));
    for (int i = 0; i <= len - 26 && flag == 1; i++) {
      memset(b, 0, sizeof(b));
      int countt1 = 0, countt2 = 0;
      for (int j = i; j < i + 26; j++) {
        if (str[j] >= 'A' && str[j] <= 'Z') {
          b[str[j] - 'A']++;
        } else
          countt1++;
      }
      for (int j = 0; j < 26; j++) {
        if (b[j] == 1) countt2++;
      }
      if (countt1 + countt2 == 26) {
        int m = 0;
        for (int j = i; j < i + 26; j++) {
          if (str[j] == '?') {
            for (; m < 26; m++) {
              if (b[m] == 0) {
                str[j] = 'A' + m;
                m++;
                break;
              }
            }
          }
        }
        flag = 0;
      }
    }
    for (int i = 0; i < len; i++) {
      if (str[i] == '?') str[i] = 'A';
    }
    if (flag)
      printf("-1\n");
    else
      printf("%s\n", str);
  }
  return 0;
}
