#include <bits/stdc++.h>
using namespace std;
int vis[26];
char s[60000];
bool judge(char *s, int start) {
  memset(vis, 0, sizeof(vis));
  bool x = true;
  for (int i = start; i < start + 26; i++) {
    if (s[i] == '?') continue;
    int num = s[i] - 'A';
    if (vis[num] == 0)
      vis[num] = 1;
    else {
      x = false;
      break;
    }
  }
  return x;
}
int main() {
  scanf("%s", s);
  int len = strlen(s);
  int flag = -1;
  if (len >= 26) {
    for (int i = 0; i <= len - 26; i++) {
      if (judge(s, i)) {
        flag = i;
        break;
      }
    }
  }
  if (flag == -1)
    cout << "-1" << endl;
  else {
    for (int i = flag; i < flag + 26; i++) {
      if (s[i] == '?') {
        for (int j = 0; j < 26; j++)
          if (vis[j] == 0) {
            s[i] = 'A' + j;
            vis[j] = 1;
            break;
          }
      }
    }
    for (int i = 0; i < len; i++) {
      if (s[i] == '?')
        printf("A");
      else
        printf("%c", s[i]);
    }
    cout << endl;
  }
  return 0;
}
