#include <bits/stdc++.h>
using namespace std;
string s;
int judge[26];
int main() {
  cin >> s;
  int n = s.length();
  if (s.length() < 26) {
    cout << -1 << endl;
    return 0;
  }
  int need = 26;
  int now = 0;
  for (int j = 0; j < n - 25; j++) {
    now = j;
    for (int i = 0; i < 26; i++) {
      if (s[j + i] == '?')
        need--;
      else {
        if (judge[s[j + i] - 'A'] == 0) {
          judge[s[j + i] - 'A'] = 1;
          need--;
        } else if (judge[s[j + i] - 'A'] == 1) {
          for (int q = 0; q < 26; q++) {
            judge[q] = 0;
          }
          need = 26;
          break;
        }
      }
      if (need == 0) {
        break;
      }
    }
    if (need == 0) {
      break;
    }
  }
  if (need != 0) {
    cout << -1 << endl;
    return 0;
  }
  for (int q = 0; q < 26; q++) {
    judge[q] = 0;
  }
  for (int i = now; i < now + 26; i++) {
    if (s[i] != '?') {
      judge[s[i] - 'A'] = 1;
    }
  }
  for (int i = now; i < now + 26; i++) {
    if (s[i] == '?') {
      for (int j = 0; j < 26; j++) {
        if (judge[j] == 0) {
          judge[j] = 1;
          s[i] = 'A' + j;
          break;
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == '?') {
      s[i] = 'A';
    }
  }
  cout << s << endl;
}
