#include <bits/stdc++.h>
using namespace std;
int cnt[26], cntqmarks, k, cntNotadded;
string s;
vector<char> absentchars;
int main() {
  cin >> k >> s;
  int st = 0, ed = s.size() - 1;
  while (st <= ed) {
    if (s[st] == s[ed] && s[st] == '?') cntqmarks++;
    st++;
    ed--;
  }
  st = 0, ed = s.size() - 1;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == '?') continue;
    cnt[s[i] - 'a']++;
    if (cnt[s[i] - 'a'] && (s[i] - 'a' + 1) > k) {
      puts("IMPOSSIBLE");
      return 0;
    }
  }
  for (int i = 0; i < k; ++i) {
    if (cnt[i]) continue;
    cntNotadded++;
    absentchars.push_back(i + 'a');
  }
  if (cntNotadded > cntqmarks) {
    puts("IMPOSSIBLE");
    return 0;
  }
  int nottine = 0;
  while (cntqmarks > cntNotadded) {
    st = 0, ed = s.size() - 1;
    while (st <= ed) {
      if (s[st] == s[ed] && s[st] == '?' && cntqmarks > cntNotadded) {
        s[st] = 'a';
        s[ed] = 'a';
        cntqmarks--;
      }
      st++;
      ed--;
    }
    nottine++;
    if (nottine >= 1e6) break;
  }
  nottine = 0;
  while (cntqmarks) {
    st = 0, ed = s.size() - 1;
    while (st <= ed) {
      if (s[st] == '?' && s[st] == s[ed] && cntqmarks) {
        for (int i = 0; i < absentchars.size(); ++i) {
          if (absentchars[i] != '#' && cntqmarks) {
            s[st] = absentchars[i];
            s[ed] = s[st];
            absentchars[i] = '#';
            cntqmarks--;
            break;
          }
        }
      }
      st++;
      ed--;
    }
    nottine++;
    if (nottine >= 1e6) break;
  }
  if (s.size() == 1 && k == 1) {
    cout << 'a';
    return 0;
  }
  if (k > s.size()) {
    puts("IMPOSSIBLE");
    return 0;
  }
  st = 0, ed = s.size() - 1;
  while (st <= ed) {
    if (s[st] != '?' && s[ed] == '?') {
      s[ed] = s[st];
    } else if (s[st] == '?' && s[ed] != '?') {
      s[st] = s[ed];
    } else if (s[st] != s[ed] && s[st] != '?') {
      puts("IMPOSSIBLE");
      return 0;
    }
    st++;
    ed--;
  }
  cout << s;
  return 0;
}
