#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int k;
  string s;
  cin >> k >> s;
  int n = s.size();
  set<char> se;
  for (char c = 'a'; c < char('a' + k); c++) se.insert(c);
  bool flag = true;
  vector<int> a;
  for (int i = 0; i < n / 2; i++) {
    se.erase(s[i]);
    se.erase(s[n - i - 1]);
    if (s[i] == '?' && s[n - i - 1] == '?') a.emplace_back(i);
    if (s[i] != s[n - i - 1] && (s[i] == '?' || s[n - i - 1] == '?')) {
      (s[i] == '?' ? (s[i] = s[n - i - 1]) : (s[n - i - 1] = s[i]));
    }
    flag &= s[i] == s[n - i - 1];
  }
  if (n & 1) {
    se.erase(s[n / 2]);
    if (s[n / 2] == '?') a.emplace_back(n / 2);
  }
  flag &= a.size() >= se.size();
  int cnt = a.size();
  for (int i : a) {
    s[i] = s[n - i - 1] = (cnt > se.size() ? 'a' : *begin(se));
    if (cnt <= se.size()) se.erase(begin(se));
    cnt--;
  }
  int d = 0;
  bool bar = true;
  for (int i = 0; i <= n / 2; i++) {
    bar &= s[i] == s[n - i - 1];
    d |= 1 << (s[i] - 'a');
    d |= 1 << (s[n - i - 1] - 'a');
  }
  bar &= d == (1 << k) - 1;
  flag &= bar;
  cout << (flag ? s : "IMPOSSIBLE");
  return 0;
}
