#include <bits/stdc++.h>
using namespace std;
char s[500010];
int num[30];
bool vis[30];
int main() {
  scanf("%s", s);
  int len = strlen(s);
  bool ok = false;
  int id = 0;
  for (int i = 0; i + 25 < len; ++i) {
    memset(num, 0, sizeof num);
    int tmp = 0, cnt = 0;
    for (int j = 0; j < 26 && i + j < len; ++j) {
      char alpha = s[i + j];
      if (alpha == '?') {
        ++tmp;
        continue;
      }
      ++num[alpha - 'A'];
      if (num[alpha - 'A'] == 1) cnt++;
    }
    if (cnt + tmp == 26) {
      id = i;
      ok = true;
      break;
    }
  }
  if (!ok)
    printf("-1\n");
  else {
    memset(vis, 0, sizeof vis);
    for (int i = 0; i < 26; ++i) {
      if (s[i + id] != '?') {
        vis[s[i + id] - 'A'] = true;
      }
    }
    queue<char> q;
    while (!q.empty()) q.pop();
    for (int i = 0; i < 26; ++i) {
      if (!vis[i]) q.push(i + 'A');
    }
    for (int i = 0; i < 26; ++i) {
      if (s[i + id] == '?') {
        s[i + id] = q.front();
        q.pop();
      }
    }
    for (int i = 0; i < len; ++i) {
      if (s[i] == '?') s[i] = 'A';
    }
    printf("%s\n", s);
  }
  return 0;
}
