#include <bits/stdc++.h>
using namespace std;
const int N = 25;
bool used[26];
int main() {
  int k;
  cin >> k;
  string s;
  cin >> s;
  for (int i = (0), _b = (s.size()); i < (_b); ++i) {
    if (s[i] == '?') continue;
    int d = s[i] - 'a';
    if (d < k) used[d] = true;
  }
  string imp = "IMPOSSIBLE";
  int r = s.size() / 2;
  int l = r - (s.size() % 2 == 0 ? 1 : 0);
  for (int i = l, j = r; i > -1 && j < s.size(); --i, ++j) {
    if (s[i] != '?' && s[j] != '?' && s[i] != s[j]) {
      s = imp;
      break;
    }
    if (s[i] == '?' && s[j] == '?') {
      for (int idx = (k - 1), _b = (-1); idx > (_b); --idx) {
        if (!used[idx]) {
          s[i] = s[j] = idx + 'a';
          used[idx] = true;
          break;
        }
      }
      if (s[i] == '?') {
        s[i] = s[j] = 'a';
      }
    } else if (s[i] == '?')
      s[i] = s[j];
    else if (s[j] == '?')
      s[j] = s[i];
  }
  for (int i = (0), _b = (k); i < (_b); ++i)
    if (!used[i]) {
      s = imp;
      break;
    }
  cout << s << endl;
  return 0;
}
