#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  string x;
  cin >> x;
  if (x.size() < 26) {
    cout << -1;
    return 0;
  }
  map<char, int> m;
  int i, j;
  bool can = 0;
  for (int i = 0; i < 26; i++) {
    m[char(65 + i)] = 0;
  }
  for (i = 0; i <= x.size() - 26; i++) {
    for (j = i; j < 26 + i; j++) {
      if (m[x[j]] == 0)
        m[x[j]]++;
      else {
        if (x[j] == '?')
          m[x[j]]++;
        else
          break;
      }
      if (j == 25 + i) {
        can = 1;
      }
    }
    if (can) break;
    for (int k = 0; k < 26; k++) {
      m[char(65 + k)] = 0;
    }
    m['?'] = 0;
  }
  if (can) {
    auto it = m.rbegin();
    for (int k = i; k < i + 26; k++) {
      if (x[k] == '?') {
        while (it->second == 1) it++;
        x[k] = it->first;
        it->second = 1;
      }
    }
    for (int k = 0; k < x.size(); k++) {
      if (x[k] == '?') x[k] = 'A';
    }
    cout << x;
  } else
    cout << -1;
}
