#include <bits/stdc++.h>
using namespace std;
inline int _Int() {
  int x;
  scanf("%d", &x);
  return x;
}
long long int bigMod(long long int A, long long int P, int M) {
  long long int R = 1;
  for (A %= M; P; P >>= 1) {
    if (P & 1) R = (R * A) % M;
    A = (A * A) % M;
  }
  return R;
}
long long int bigMul(long long int A, long long int B, long long int M) {
  long long int R = 0;
  for (A %= M; B; B >>= 1) {
    if (B & 1) R = (R + A) % M;
    A = (A + A) % M;
  }
  return R;
}
long long int negMod(long long int A, long long int B) {
  return (((A % B) + B) % B);
}
unsigned long long int _pow(unsigned long long int A, int P) {
  unsigned long long int R = 1;
  for (; P; P >>= 1) {
    if (P & 1) R = (R * A);
    A = (A * A);
  }
  return R;
}
template <class T>
T GCD(T x, T y) {
  while (x) x ^= y ^= x ^= y %= x;
  return y;
}
char s[50000 + 7];
bool fr[26];
char v[26], vz;
void Main() {
  scanf("%s", s);
  int n = strlen(s);
  for (int i = 0; (i + 25) < n; i++) {
    int tc = 26;
    memset(fr, 0, sizeof(fr));
    int cc = 0, qc = 0;
    for (int j = i; tc--; j++) {
      if (s[j] != '?' && !fr[s[j] - 'A']) {
        fr[s[j] - 'A'] = 1;
        cc++;
      }
      if (s[j] == '?') qc++;
    }
    if (cc + qc == 26) {
      vz = 0;
      for (int j = 0; j < 26; j++) {
        if (!fr[j]) v[vz++] = j + 'A';
      }
      int tc = 26;
      for (int j = i; tc--; j++) {
        if (s[j] == '?') s[j] = v[--vz];
      }
      for (int j = 0; j < n; j++)
        if (s[j] == '?') s[j] = 'A';
      printf("%s", s);
      return;
    }
  }
  printf("-1");
}
int main() {
  Main();
  return 0;
}
