#include <bits/stdc++.h>
int main() {
  std::string s;
  std::cin >> s;
  int len = s.length();
  bool flag = false;
  int i = 0;
  bool vis[30];
  while (i + 25 < len) {
    memset(vis, 0, sizeof(vis));
    flag = true;
    for (int j = 0; j < 26; j++) {
      if (s[i + j] != '?') {
        if (!vis[s[i + j] - 'A'])
          vis[s[i + j] - 'A'] = 1;
        else {
          flag = false;
          i++;
          break;
        }
      }
    }
    if (flag) {
      for (int k = i; k <= i + 25; k++) {
        if (s[k] == '?')
          for (char c = 'A'; c <= 'Z'; c++)
            if (!vis[c - 'A']) {
              s[k] = c;
              vis[c - 'A'] = 1;
              break;
            }
      }
      break;
    }
  }
  if (!flag)
    printf("-1");
  else {
    for (int i = 0; i < len; i++)
      if (s[i] == '?') s[i] = 'A';
    std::cout << s;
  }
  printf("\n");
}
