#include <bits/stdc++.h>
using namespace std;
const int MAX_S = 50000 + 10;
struct DT {
  DT() { Zero(); }
  int cnt[27];
  void operator=(const DT& dt) {
    for (int i = 0; i < 27; ++i) cnt[i] = dt.cnt[i];
  }
  void operator+=(const DT& dt) {
    for (int i = 0; i < 27; ++i) cnt[i] += dt.cnt[i];
  }
  void operator-=(const DT& dt) {
    for (int i = 0; i < 27; ++i) cnt[i] -= dt.cnt[i];
  }
  void Zero() {
    for (int i = 0; i < 27; ++i) cnt[i] = 0;
  }
  bool check() {
    for (int i = 0; i < 27; ++i) {
      if (cnt[i] > 1) return false;
    }
    return true;
  }
};
DT dp[MAX_S];
char buf[MAX_S];
int main() {
  scanf("%s", buf);
  int index = 0;
  bool ans = false;
  while (buf[index] > 0) {
    dp[index + 1] = dp[index];
    if (buf[index] != '?') ++dp[index + 1].cnt[buf[index] - 'A'];
    if (index >= 25) {
      DT t = dp[index + 1];
      t -= dp[index - 25];
      if (t.check()) {
        ans = true;
        vector<char> psh;
        for (int i = 0; i < 26; ++i)
          if (t.cnt[i] == 0) psh.push_back('A' + i);
        for (int i = index - 25; i <= index; ++i) {
          if (buf[i] == '?') {
            buf[i] = psh.back();
            psh.pop_back();
          }
        }
        break;
      }
    }
    ++index;
  }
  if (!ans) {
    printf("-1\n");
    return 0;
  }
  for (int i = 0; buf[i] > 0; ++i) {
    if (buf[i] == '?') buf[i] = 'A';
  }
  printf("%s\n", buf);
  return 0;
}
