#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
bool mark['Z'];
int main() {
  int n;
  cin >> n;
  memset(mark, 0, sizeof mark);
  string s;
  cin >> s;
  int left = 0;
  int right = s.size() - 1;
  vector<pii> p;
  while (left <= right) {
    if (s[left] == '?' && s[right] != '?') {
      s[left] = s[right];
      mark[s[left]] = 1;
    } else if (s[right] == '?' && s[left] != '?') {
      s[right] = s[left];
      mark[s[left]] = 1;
    } else if (s[left] != '?' && s[right] != '?') {
      mark[s[left]] = 1;
      mark[s[right]] = 1;
      if (s[left] != s[right]) {
        cout << "IMPOSSIBLE" << endl;
        return 0;
      }
    } else if (s[left] == '?' && s[right] == '?') {
      p.push_back(pii(left, right));
    }
    ++left;
    --right;
  }
  vector<char> v;
  for (int i = 'a'; i < 'a' + n; ++i) {
    if (!mark[i]) v.push_back(i);
  }
  sort(v.begin(), v.end());
  sort(p.begin(), p.end());
  int vsize = v.size();
  int psize = p.size();
  int cha = 0;
  if (p.size() > v.size()) {
    cha = p.size() - v.size();
  }
  for (int i = 0; i < cha; ++i) {
    s[p[i].first] = 'a';
    s[p[i].second] = 'a';
  }
  int top = 0;
  for (int i = cha; i < psize; ++i) {
    mark[v[top]] = 1;
    s[p[i].first] = v[top];
    s[p[i].second] = v[top++];
  }
  int sum1 = 0;
  for (int i = 'a'; i < 'a' + n; ++i) {
    sum1 += mark[i];
  }
  if (sum1 == n) {
    cout << s << endl;
  } else {
    cout << "IMPOSSIBLE" << endl;
  }
}
