#include <bits/stdc++.h>
using namespace std;
string s;
int l, t, c, a;
bool vis[26];
bool ok = false;
int main() {
  cin >> s;
  l = s.size();
  if (l < 26) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < l; ++i) {
    memset(vis, 0, sizeof vis);
    t = c = 0;
    for (int j = i; j < i + 26 && j < l; ++j) {
      if (vis[s[j] - 'A']) break;
      if (s[j] == '?') {
        c++;
        continue;
      }
      vis[s[j] - 'A']++;
      t++;
    }
    if (c + t == 26) {
      a = i;
      ok = true;
      break;
    }
  }
  if (!ok) {
    cout << -1 << endl;
    return 0;
  }
  queue<char> q;
  for (int j = 0; j < 26; ++j) {
    if (!vis[j]) q.push((char)j + 'A');
  }
  for (int i = 0; i < a; ++i)
    if (s[i] != '?')
      cout << s[i];
    else
      cout << 'A';
  for (int i = a; i < 26 + a; ++i)
    if (s[i] != '?')
      cout << s[i];
    else {
      cout << q.front();
      q.pop();
    }
  for (int i = 26 + a; i < l; ++i)
    if (s[i] != '?')
      cout << s[i];
    else
      cout << 'A';
  return 0;
}
