#include <bits/stdc++.h>
using namespace std;
int main() {
  int k, x[30] = {0};
  string s;
  cin >> k >> s;
  int flag = 0;
  if (s.size() < 2 * k - 1) {
    cout << "IMPOSSIBLE" << endl;
    return 0;
  }
  for (int i = 0; i < s.size(); i++) {
    if (s[i] >= 'a' && s[i] <= 'z') {
      if (s[i] - 'a' >= k) {
        cout << "IMPOSSIBLE" << endl;
        return 0;
      }
      x[s[i] - 'a'] = 1;
    }
  }
  int num = 0;
  for (int i = 0; i < k; i++) {
    if (x[i] == 0) num++;
  }
  int cnt = k - 1;
  for (int i = s.size() / 2; i >= 0; i--) {
    if (s[i] == '?' && s[s.size() - i - 1] == '?') {
      while (x[cnt] == 1) {
        if (cnt == 0) break;
        cnt--;
      }
      s[i] = cnt + 'a';
      s[s.size() - i - 1] = s[i];
      x[cnt] = 1;
      num--;
    } else if (s[i] == '?') {
      s[i] = s[s.size() - i - 1];
    } else if (s[s.size() - i - 1] == '?') {
      s[s.size() - i - 1] = s[i];
    }
    if (s[s.size() - i - 1] != s[i]) {
      flag = 1;
      break;
    }
  }
  if (num > 0 || flag == 1) {
    cout << "IMPOSSIBLE" << endl;
    return 0;
  }
  cout << s << endl;
  return 0;
}
