#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e4 + 10;
int n, m;
char a[maxn];
map<char, int> mp;
int main() {
  scanf("%s", a + 1);
  int len = strlen(a + 1), l, r, tt = 0;
  for (int i = 1; i <= len - 25; i++) {
    bool flag = 0;
    mp.clear();
    for (int j = 0; j < 26 && i + j <= len; j++) {
      char ch = a[i + j];
      if (ch != '?') {
        if (mp[ch] == 0) {
          mp[ch]++;
        } else {
          flag = 1;
          break;
        }
      }
    }
    if (flag == 0) {
      l = i;
      r = i + 25;
      tt = 1;
      break;
    }
  }
  if (tt == 0) {
    cout << "-1" << endl;
    return 0;
  }
  for (int i = 1; i < l; i++) {
    if (a[i] != '?')
      cout << a[i];
    else
      cout << 'A';
  }
  for (int i = l; i <= r; i++) {
    if (a[i] != '?') {
      cout << a[i];
    } else {
      for (char j = 'A'; j <= 'Z'; j++) {
        if (mp[j] == 0) {
          cout << j;
          mp[j]++;
          break;
        }
      }
    }
  }
  for (int i = r + 1; i <= len; i++) {
    if (a[i] != '?')
      cout << a[i];
    else
      cout << 'A';
  }
  return 0;
}
