#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000100;
const int INF = 1e9 + 10;
char s[maxn];
int len;
int cnt[26];
int main() {
  while (~scanf("%s", s)) {
    len = strlen(s);
    int ans = -1;
    for (int i = 0; i <= len - 1; i++) {
      if (i + 25 >= len) break;
      memset(cnt, 0, sizeof(cnt));
      int tag = 1;
      for (int j = i; j <= i + 25; j++) {
        if (s[j] == '?') continue;
        cnt[s[j] - 'A']++;
        if (cnt[s[j] - 'A'] > 1) {
          tag = 0;
          break;
        }
      }
      if (tag) {
        int now = 0;
        for (int j = 0; j <= 25; j++) {
          if (cnt[j] == 0) {
            now = j;
            break;
          }
        }
        for (int j = i; j <= i + 25; j++) {
          if (s[j] != '?') continue;
          while (cnt[now]) now++;
          cnt[now]++;
          s[j] = now + 'A';
        }
        ans = 1;
        for (int k = 0; k <= len - 1; k++)
          if (s[k] == '?') s[k] = 'A';
      }
    }
    if (ans == -1)
      puts("-1");
    else
      printf("%s\n", s);
  }
  return 0;
}
