#include <bits/stdc++.h>
using namespace std;
const int mac = 1e5 + 10;
const int inf = 1e8 + 10;
char s[mac];
int vis[mac];
int main() {
  scanf("%s", s);
  int len = strlen(s);
  if (len < 26)
    printf("-1\n");
  else {
    int mark = -1, tail = 0;
    for (int i = 0; i < len; i++) {
      if (mark != -1) break;
      if (s[i] != '?') {
        vis[s[i] - 'A']++;
        while (vis[s[i] - 'A'] > 1) {
          vis[s[tail] - 'A']--;
          tail++;
        }
      }
      if (i - tail + 1 == 26) mark = tail;
    }
    if (mark == -1) {
      printf("-1\n");
      return 0;
    }
    for (int i = 0; i < len; i++) {
      if (i == mark) {
        for (int j = i; j < i + 26; j++) {
          if (s[j] == '?') {
            for (int k = 0; k < 26; k++) {
              if (!vis[k]) {
                printf("%c", 'A' + k);
                vis[k]++;
                break;
              }
            }
          } else
            printf("%c", s[j]);
        }
        i += 26;
      }
      if (i >= len) {
        printf("\n");
        return 0;
      }
      if (s[i] == '?')
        printf("A");
      else
        printf("%c", s[i]);
    }
    printf("\n");
  }
  return 0;
}
