#include <bits/stdc++.h>
using namespace std;
int vf[26];
int main() {
  int n, i, j, l, contor = 0, contor2 = 0, semafor = 0;
  char s[50001];
  cin >> s;
  n = strlen(s);
  if (n < 26)
    cout << -1;
  else {
    for (i = 0; i < n; i++) {
      if ('A' <= s[i] && s[i] <= 'Z') vf[s[i] - 'A']++;
      if ('A' <= s[i] && s[i] <= 'Z' && vf[s[i] - 'A'] == 1)
        contor++;
      else if (s[i] == '?')
        contor2++;
      if (i >= 25) {
        if (contor + contor2 == 26) {
          semafor = 1;
          for (j = i - 25; j <= i; j++) {
            if (s[j] == '?')
              for (l = 0; l <= 25; l++)
                if (vf[l] == 0) {
                  s[j] = l + 'A';
                  vf[l]++;
                  l = 25;
                }
          }
          contor2 = 0;
        }
        if (s[i - 25] == '?')
          contor2--;
        else {
          vf[s[i - 25] - 'A']--;
          if (vf[s[i - 25] - 'A'] == 0) contor--;
        }
      }
    }
    if (semafor == 0)
      cout << -1;
    else {
      for (i = 0; i < n; i++)
        if (s[i] == '?') s[i] = 'A';
      cout << s;
    }
  }
  return 0;
}
