#include <bits/stdc++.h>
using namespace std;
int n, k;
string s;
bool B[1000];
int main() {
  cin >> k;
  cin >> s;
  n = s.size();
  int l = (n + 1) / 2;
  for (int i = 0; i < n; i++)
    if (s[i] != '?') B[s[i]] = true;
  for (int i = l - 1; i >= 0; i--)
    if (s[i] == '?' && s[n - i - 1] == '?') {
      char c = 'a';
      for (int j = 'a'; j < 'a' + k; j++)
        if (B[j] == false) {
          c = char(j);
        }
      B[c] = true;
      s[i] = c;
      s[n - i - 1] = c;
    } else if (s[i] == '?') {
      s[i] = s[n - i - 1];
    } else if (s[n - i - 1] == '?') {
      s[n - i - 1] = s[i];
    }
  bool ok = true;
  for (int i = 'a'; i < 'a' + k; i++)
    if (B[i] == false) ok = false;
  for (int i = 0; i < l; i++)
    if (s[i] != s[n - i - 1]) ok = false;
  if (!ok)
    cout << "IMPOSSIBLE" << endl;
  else
    cout << s << endl;
  cin >> n;
}
