#include <bits/stdc++.h>
using namespace std;
const int N = 5E4 + 10;
char a[N];
int n, m;
int main() {
  scanf("%s", a);
  n = strlen(a);
  if (n < 26) {
    printf("-1\n");
    return 0;
  }
  bool f = 0;
  for (int i = 25; i <= n - 1; ++i) {
    int cnt[26]{};
    for (int j = 1; j <= 26; ++j)
      if (a[i - j + 1] != '?') ++cnt[a[i - j + 1] - 'A'];
    bool g = 1;
    for (int j = 0; j <= 25; ++j)
      if (cnt[j] > 1) {
        g = 0;
        break;
      }
    if (!g) continue;
    int now = 0;
    for (int j = 1; j <= 26; ++j)
      if (a[i - j + 1] == '?') {
        while (cnt[now]) ++now;
        a[i - j + 1] = now + 'A';
        ++now;
      }
    f = 1;
    break;
  }
  if (!f) {
    printf("-1\n");
    return 0;
  }
  for (int i = 0; i <= n - 1; ++i)
    if (a[i] == '?') a[i] = 'A';
  printf("%s\n", a);
}
