#include <bits/stdc++.h>
using namespace std;
int b[2000];
char s[200000];
int flag = 0;
int main() {
  scanf("%s", s);
  int len = strlen(s);
  if (len < 26) {
    cout << "-1\n";
    return 0;
  }
  for (int i = 0; i <= len - 26 && !flag; i++) {
    memset(b, 0, sizeof(b));
    int cnt1 = 0, cnt2 = 0;
    for (int j = i; j < i + 26; j++) {
      if (s[j] >= 'A' && s[j] <= 'Z')
        b[s[j] - 'A']++;
      else
        cnt1++;
    }
    for (int j = 0; j < 26; j++)
      if (b[j] == 1) cnt2++;
    if (cnt1 + cnt2 == 26) {
      for (int j = i; j < i + 26; j++) {
        if (s[j] != '?') continue;
        for (int t = 0; t < 26; t++) {
          if (b[t] == 0) {
            s[j] = t + 'A';
            b[t] = 1;
            break;
          }
        }
      }
      flag = 1;
    }
  }
  if (!flag)
    cout << "-1\n";
  else {
    for (int i = 0; i < len; i++) {
      if (s[i] == '?')
        cout << 'A';
      else
        cout << s[i];
    }
  }
  return 0;
}
