#include <bits/stdc++.h>
using namespace std;
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
void solve() {
  string s;
  cin >> s;
  long long a[27] = {0};
  long long n = s.size();
  for (long long i = 0; i < n - 25; i++) {
    for (long long j = i; j < i + 26; j++) {
      if (s[j] == '?')
        a[26]++;
      else
        a[s[j] - 'A']++;
    }
    bool b = true;
    string t;
    for (long long j = 0; j < 26; j++) {
      if (a[j] > 1) {
        b = 0;
        break;
      } else if (a[j] == 0)
        t += ('A' + j);
    }
    if (b) {
      for (long long j = 0; j < i; j++) {
        if (s[j] == '?')
          cout << 'A';
        else
          cout << s[j];
      }
      long long k = 0;
      for (long long j = i; j < i + 26; j++) {
        if (s[j] == '?') {
          cout << t[k];
          k++;
        } else
          cout << s[j];
      }
      for (long long j = i + 26; j < s.size(); j++) {
        if (s[j] == '?')
          cout << 'A';
        else
          cout << s[j];
      }
      return;
    } else {
      t = "";
      for (long long j = 0; j < 27; j++) {
        a[j] = 0;
      }
    }
  }
  cout << -1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long test;
  test = 1;
  while (test--) {
    solve();
  }
  return 0;
}
