#include <bits/stdc++.h>
using namespace std;
const long long N = 3e5 + 100, INF = 1e9 + 7, M = 18;
const double EPS = 1e-10;
int a[26];
int main() {
  string s, s1, s2, s3;
  int i, j, k, n, c, m, f, t, cur = 1;
  cin >> s;
  k = 0;
  for (i = 0; i < int((s).size()) - 25; i++) {
    s2 = s.substr(i, 26);
    bool ok = true;
    for (j = 0; j < 26; j++)
      if (s2[j] != '?') {
        if (a[s2[j] - 'A']) {
          ok = false;
          break;
        }
        a[s2[j] - 'A'] = 1;
      }
    if (ok) {
      for (j = 0; j < 26; j++)
        if (s2[j] == '?')
          for (f = 0; f < 26; f++)
            if (!a[f]) {
              s[i + j] = 'A' + f;
              a[f] = 1;
              break;
            }
      for (j = 0; j < int((s).size()); j++)
        if (s[j] == '?') s[j] = 'A';
      cout << s << endl;
      return 0;
    }
    for (j = 0; j < 26; j++) a[j] = 0;
  }
  cout << -1;
  return 0;
}
