#include <bits/stdc++.h>
using namespace std;
string s;
set<char> a;
int cnt[26];
int miss = 0;
void fix(int i, int cnt[], int mis) {
  int idx = 0;
  for (int j = i; j < i + 26; j++) {
    if (s[j] == '?') {
      while (idx < 26 && cnt[idx] != 0) {
        ++idx;
      }
      s[j] = char(idx + 'A');
      cnt[idx]++;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> s;
  int n = s.size();
  if (n < 26) {
    cout << "-1\n";
    return 0;
  }
  memset(cnt, 0, sizeof(cnt));
  bool solution = false;
  for (int i = 0; i < 25; i++) {
    if (s[i] == '?')
      ++miss;
    else
      cnt[s[i] - 'A']++;
  }
  for (int i = 25; i < n; i++) {
    if (s[i] == '?')
      ++miss;
    else
      cnt[s[i] - 'A']++;
    if (i - 26 >= 0) {
      if (s[i - 26] == '?')
        --miss;
      else
        cnt[s[i - 26] - 'A']--;
    }
    bool possible = true;
    for (int j = 0; j < 26; j++) {
      if (cnt[j] > 1) possible = false;
    }
    if (possible) {
      fix(i - 25, cnt, miss);
      solution = true;
      break;
    }
  }
  if (!solution) {
    cout << "-1\n";
  } else {
    for (int i = 0; i < n; i++) {
      if (s[i] == '?')
        cout << "A";
      else
        cout << s[i];
    }
    cout << "\n";
  }
  return 0;
}
