#include <bits/stdc++.h>
using namespace std;
int main() {
  string r;
  cin >> r;
  set<char> x1 = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
                  'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
                  'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
  set<char> x;
  int uk = 0;
  if (r.size() < 26) cout << -1 << endl;
  if (r.size() == 26) {
    for (int i = 0; i < r.size(); i++) {
      if (r[i] != '?') {
        x.insert(r[i]);
        x1.erase(r[i]);
      } else
        uk++;
    }
    if (x.size() + uk < 26)
      cout << -1;
    else {
      for (int i = 0; i < r.size(); i++) {
        if (r[i] != '?')
          cout << r[i];
        else {
          for (char w : x1) {
            cout << w;
            x1.erase(w);
            break;
          }
        }
      }
    }
    cout << endl;
  }
  if (r.size() > 26) {
    int seen = 0;
    int end = 0;
    for (int i = 0; i < r.size(); i++) {
      if (r[i] != '?') {
        if (x.find(r[i]) == x.end()) {
          x.insert(r[i]);
          seen++;
          x1.erase(r[i]);
        } else {
          int t = i - seen;
          while (r[t] != r[i]) {
            x.erase(r[t]);
            if (r[t] != '?') x1.insert(r[t]);
            t++;
            seen--;
          }
        }
      } else {
        seen++;
      }
      if (seen == 26) {
        end = i;
        break;
      }
    }
    if (seen != 26)
      cout << -1;
    else {
      int start = end - 25;
      for (int i = 0; i < r.size(); i++) {
        if (i < start or i > end) {
          if (r[i] != '?')
            cout << r[i];
          else
            cout << "A";
        } else {
          if (r[i] != '?') {
            cout << r[i];
            x1.erase(r[i]);
          } else {
            for (char w : x1) {
              cout << w;
              x1.erase(w);
              break;
            }
          }
        }
      }
    }
    cout << endl;
  }
}
