#include <bits/stdc++.h>
using namespace std;
const int N = 5 * 1e4 + 2;
const int mod = 1e9 + 7;
const int alphabet = 26;
const int dx[] = {1, 1, -1, -1, 2, 2, -2, -2};
const int dy[] = {2, -2, 2, -2, 1, -1, 1, -1};
const int dz[] = {1, 1, 0, 0, -1, 1};
int m[26];
int main() {
  int k;
  cin >> k;
  string s;
  cin >> s;
  char c = 'a';
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != '?') m[s[i] - 'a'] = 1;
    if (s[i] - 'a' >= k && s[i] != '?') {
      cout << "IMPOSSIBLE";
      return 0;
    }
  }
  int n = s.size();
  int cnt = 0;
  for (int i = 0; i < n / 2 + (n % 2 == 1); i++) {
    if (s[i] == '?' && s[n - i - 1] == '?')
      cnt++;
    else if (s[i] == '?' && s[n - i - 1] != '?') {
      s[i] = s[n - i - 1];
    } else if (s[i] != '?' && s[n - i - 1] == '?') {
      s[n - i - 1] = s[i];
    } else if (s[i] != s[n - i - 1]) {
      cout << "IMPOSSIBLE";
      return 0;
    }
  }
  int cur = 0;
  for (int i = 0; i < k; i++) {
    if (m[i] == 0) {
      cur++;
    }
  }
  cnt -= cur;
  if (cnt < 0) {
    cout << "IMPOSSIBLE";
    return 0;
  }
  for (int i = 0; i < n / 2 + (n % 2 == 1); i++) {
    if (s[i] == '?' && s[n - i - 1] == '?') {
      c = 'a';
      if (cnt == 0) {
        for (int j = 0; j < k; j++) {
          if (!m[j]) {
            c = char(j + 'a');
            m[j] = 1;
            break;
          }
        }
        s[i] = c;
        s[n - i - 1] = c;
      } else {
        cnt--;
        s[i] = c;
        s[n - i - 1] = c;
      }
    }
  }
  for (int i = 0; i < k; i++) {
    if (m[i] == 0) {
      cout << "IMPOSSIBLE";
      return 0;
    }
  }
  cout << s;
}
