#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double eps = 1e-9;
const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const long long INFLL = 0x3f3f3f3f3f3f3f3f;
const int MAXN = 2e5 + 5;
char s[MAXN];
int cnt[27], n, had;
int check() {
  int need = 0;
  for (int i = 0; i < 26; i++) {
    if (cnt[i] == 0) need++;
  }
  if (had == need) return 1;
  return 0;
}
void out(int st, int en) {
  for (int i = st, p = 0; i <= en; i++) {
    while (cnt[p]) p++;
    if (s[i] == '?') s[i] = 'A' + p++;
  }
  for (int i = 1; i < st; i++)
    if (s[i] == '?') s[i] = 'A';
  for (int i = en + 1; i <= n; i++)
    if (s[i] == '?') s[i] = 'A';
  printf("%s\n", s + 1);
}
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  if (n < 26) return 0 * printf("-1\n");
  had = 0;
  for (int i = 1; i <= 26; i++) {
    if (s[i] == '?')
      had++;
    else
      cnt[s[i] - 'A']++;
  }
  if (check()) {
    out(1, 26);
    return 0;
  }
  for (int i = 27; i <= n; i++) {
    if (s[i - 26] == '?')
      had--;
    else
      cnt[s[i - 26] - 'A']--;
    if (s[i] == '?')
      had++;
    else
      cnt[s[i] - 'A']++;
    if (check()) {
      out(i - 26 + 1, i);
      return 0;
    }
  }
  puts("-1");
  return 0;
}
