#include <bits/stdc++.h>
using namespace std;
int cu[50005][30];
void solve() {
  int ch[30], f = 1;
  char s[50005];
  scanf("%s", s);
  int len = strlen(s);
  ;
  for (int i = 1; i <= len; i++) {
    for (int j = 0; j < 30; j++) {
      cu[i][j] = cu[i - 1][j];
    }
    if (s[i - 1] != '?') cu[i][s[i - 1] - 'A']++;
  }
  if (len < 26) {
    printf("-1\n");
    return;
  }
  for (int i = 26; i <= len; i++) {
    ;
    string temp;
    for (int j = 0; j < 30; j++) ch[j] = cu[i][j] - cu[i - 26][j];
    ;
    int flag = 0;
    for (int j = 0; j < 30; j++) {
      if (ch[j] == 0) temp += ('A' + j);
      if (ch[j] >= 2) flag++;
    };
    if (flag == 0) {
      f = 0;
      for (int j = i - 25; j <= i; j++) {
        if (s[j - 1] == '?') {
          s[j - 1] = temp[0];
          temp.erase(temp.begin());
        }
      };
      break;
    }
  };
  ;
  if (f == 1)
    printf("-1\n");
  else {
    ;
    for (int i = 0; i < len; i++) {
      if (s[i] == '?') s[i] = 'A';
      ;
    }
    printf("%s\n", s);
  }
}
int main() { solve(); }
