#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
string check(string &s, int k) {
  int n = s.length();
  set<char, greater<char>> st;
  for (int i = 0; i < (k); ++i) st.insert(i + 'a');
  string ans = "IMPOSSIBLE";
  for (int i = 0; i < (s.length()); ++i) {
    if (st.find(s[i]) != st.end()) st.erase(s[i]);
  }
  int i, j;
  if (n % 2) {
    i = n / 2 - 1;
    j = n / 2 + 1;
    if (s[n / 2] == '?') {
      if (st.size()) {
        s[n / 2] = *st.begin();
        st.erase(s[n / 2]);
      } else {
        s[n / 2] = 'a';
      }
    }
  } else {
    i = n / 2 - 1;
    j = n / 2;
  }
  while (i >= 0 && j < s.length() && st.size()) {
    if (s[i] == '?' && s[j] == '?') {
      s[i] = *st.begin();
      s[j] = *st.begin();
      st.erase(s[i]);
    }
    i--;
    j++;
  }
  if (st.size()) return ans;
  if (n % 2) {
    i = n / 2 - 1;
    j = n / 2 + 1;
  } else {
    j = n / 2;
    i = n / 2 - 1;
  }
  while (i >= 0 && j < s.length()) {
    if (s[i] == '?') {
      s[i] = s[j];
    } else if (s[j] == '?') {
      s[j] = s[i];
    } else {
      if (s[i] != s[j]) return ans;
      if (s[i] - 'a' >= k) return ans;
    }
    i--;
    j++;
  }
  for (int i = 0; i < (s.length()); ++i) {
    if (s[i] == '?') s[i] = 'a';
  }
  return s;
}
void solve() {
  int k;
  cin >> k;
  string s;
  cin >> s;
  s = check(s, k);
  cout << s << '\n';
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
