#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
const double pi = 3.141592653589793238462;
const int nmax = 200000;
const int hash_base = 119;
const long long inf = 2e18;
int k;
string s;
bool used[26], u[26];
int main() {
  cin >> k >> s;
  for (int i = 0; i < s.size(); i++)
    if (s[i] == '?') s[i] = s[s.size() - i - 1];
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != '?') used[s[i] - 'a'] = true;
    if (s[i] != s[s.size() - i - 1]) {
      printf("IMPOSSIBLE\n");
      return 0;
    };
  };
  for (int i = 0; i < 26; i++) u[i] = used[i];
  int it = 0;
  string t = s;
  for (int i = 0; i < s.size(); i++) {
    while (it < k - 1 && used[it]) it++;
    if (s[i] == '?') {
      if (used[it]) it = 0;
      s[i] = s[s.size() - i - 1] = (char)(it + 'a');
      used[it] = true;
      if (it < k - 1) it++;
    };
  };
  for (int i = 0; i < k; i++)
    if (!used[i]) {
      printf("IMPOSSIBLE\n");
      return 0;
    };
  string ans = s;
  for (int q = 1; q < s.size() / 2; q++) {
    s = t;
    for (int j = 0; j < 26; j++) used[j] = u[j];
    it = 0;
    for (int i = q; i < s.size(); i++) {
      while (it < k - 1 && used[it]) it++;
      if (s[i] == '?') {
        if (used[it]) it = 0;
        s[i] = s[s.size() - i - 1] = (char)(it + 'a');
        used[it] = true;
        if (it < k - 1) it++;
      };
    };
    ans = min(ans, s);
  };
  cout << ans << endl;
  return 0;
}
