#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, n, arr[26];
  string s;
  memset(&arr, -1, sizeof(arr));
  cin >> s;
  int l = s.length();
  if (l < 26) {
    cout << -1;
    return 0;
  }
  i = 0;
  j = 0;
  while (j < l) {
    if (j - i == 26) break;
    if (s[j] == '?')
      j++;
    else if (arr[s[j] - 'A'] != -1) {
      int temp = i;
      i = arr[s[j] - 'A'] + 1;
      for (; temp < i; temp++)
        if (s[temp] != '?') arr[s[temp] - 'A'] = -1;
    } else if (s[j] != '?' && arr[s[j] - 'A'] == -1) {
      arr[s[j] - 'A'] = j;
      j++;
    }
  }
  if (j - i == 26) {
    int temp = i, temp2;
    for (temp2 = 0; temp2 < 26; temp2++) {
      if (arr[temp2] == -1) {
        while (s[temp] != '?' && temp < j) temp++;
        s[temp] = 'A' + temp2;
      }
    }
    while (i--) {
      if (s[i] == '?') s[i] = s[i + 26];
    }
    while (j < l) {
      if (s[j] == '?') s[j] = s[j - 26];
      j++;
    }
    cout << s;
  } else
    cout << -1;
  return 0;
}
