#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 5, INF = (int)1e9;
const long double EPS = 1e-9;
int a[50];
int main() {
  string s;
  int n, k = 0;
  cin >> s;
  n = (int)s.size();
  if (n < 26) {
    cout << "-1\n";
    return 0;
  }
  for (int i = 0; i < 26; i++)
    if (s[i] != '?')
      a[s[i] - 'A']++;
    else
      k++;
  int c = 0, f = 1;
  vector<int> v;
  for (int j = 0; j < 26; j++)
    if (a[j] == 1)
      c++;
    else if (a[j] > 1)
      f = 0;
    else
      v.push_back(j);
  if (f) {
    int h = 0;
    for (int j = 0; j < 26; j++)
      if (s[j] == '?') s[j] = char(v[h++] + 'A');
    for (int j = 0; j < n; j++)
      if (s[j] == '?') s[j] = 'A';
    cout << s;
    return 0;
  }
  for (int i = 26; i < n; i++) {
    if (s[i - 26] == '?')
      k--;
    else
      a[s[i - 26] - 'A']--;
    if (s[i] == '?')
      k++;
    else
      a[s[i] - 'A']++;
    int c = 0, f = 1;
    vector<int> v;
    for (int j = 0; j < 26; j++)
      if (a[j] == 1)
        c++;
      else if (a[j] > 1)
        f = 0;
      else
        v.push_back(j);
    if (f) {
      int h = 0;
      for (int j = i - 25; j <= i; j++)
        if (s[j] == '?') s[j] = char(v[h++] + 'A');
      for (int j = 0; j < n; j++)
        if (s[j] == '?') s[j] = 'A';
      cout << s;
      return 0;
    }
  }
  cout << "-1\n";
  return 0;
}
