#include <bits/stdc++.h>
using namespace std;
void file() {
  freopen("input.in", "r", stdin);
  freopen("output.out", "w", stdout);
}
string s;
int kol, zap;
bool v['}'];
bool f;
int main() {
  cin >> s;
  if (s.length() < 26) {
    cout << -1;
    return 0;
  }
  f = false;
  for (int i = 0; i < s.length() - 25; ++i) {
    kol = 0;
    zap = 0;
    for (int j = 0; j < 26; ++j) {
      if (s[i + j] == '?') {
        zap++;
      } else if (!v[s[i + j]]) {
        v[s[i + j]] = true;
        kol++;
      }
    }
    if (zap + kol == 26) {
      f = true;
      for (int j = 0; j < 26; ++j) {
        if (s[i + j] == '?') {
          for (char p = 'A'; p <= 'Z'; ++p) {
            if (!v[p]) {
              s[i + j] = p;
              v[p] = true;
              break;
            }
          }
        }
      }
      break;
    }
    for (char p = 'A'; p <= 'Z'; ++p) {
      v[p] = false;
    }
  }
  if (!f) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == '?') {
      s[i] = 'A';
    }
  }
  cout << s;
}
