#include <bits/stdc++.h>
using namespace std;
const int maxn = 50000 + 100;
char s[maxn];
int a[30];
int b[maxn];
int l;
bool flag;
int cnt;
int main() {
  scanf("%s", s);
  l = strlen(s);
  if (l < 26) {
    printf("-1\n");
    return 0;
  }
  memset(a, 0, sizeof a);
  flag = 0;
  for (int i = 0; i < l - 25; i++) {
    cnt = 0;
    flag = 1;
    memset(a, 0, sizeof 0);
    memset(b, 0, sizeof 0);
    for (int j = i; j < 26 + i; j++) {
      if (s[j] == '?') {
        cnt++;
        b[cnt] = j;
      } else {
        if (a[s[j] - 'A']) {
          cnt = 0;
          flag = 0;
          memset(a, 0, sizeof a);
          memset(b, 0, sizeof b);
          break;
        } else {
          a[s[j] - 'A'] = 1;
        }
      }
    }
    if (flag) {
      if (cnt == 0) {
        break;
      }
      int pos = 0;
      for (int k = 1; k <= cnt; k++) {
        for (int q = pos; q < 26; q++) {
          if (a[q] == 0) {
            s[b[k]] = q + 'A';
            a[q] = 1;
            pos = q + 1;
            break;
          }
        }
      }
      break;
    }
  }
  if (flag) {
    for (int i = 0; i < l; i++) {
      if (s[i] == '?') {
        s[i] = 'A';
      }
    }
    printf("%s\n", s);
  } else {
    printf("-1\n");
  }
  return 0;
}
