#include <bits/stdc++.h>
using namespace std;
char s[1005];
int len, k;
bool vis[30];
bool check() {
  if (k > (len + 1) / 2) return false;
  for (int i = int(0); i < int(len); ++i) {
    int j = len - i - 1;
    if (i > j) break;
    if (s[i] == '?' && s[j] == '?') continue;
    if (s[i] == '?') s[i] = s[j];
    if (s[j] == '?') s[j] = s[i];
    if (s[i] != s[j]) return false;
  }
  for (int i = int(0); i < int((len + 1) / 2); ++i) {
    if (s[i] == '?') continue;
    vis[s[i] - 'a'] = true;
  }
  return true;
}
int main() {
  while (scanf("%d", &k) == 1) {
    memset(vis, 0, sizeof(vis));
    scanf("%s", s);
    len = strlen(s);
    if (!check()) {
      printf("IMPOSSIBLE\n");
      continue;
    }
    int mid = (len + 1) / 2;
    for (int i = int(mid - 1); i >= int(0); --i) {
      if (s[i] == '?') {
        for (int j = int(k - 1); j >= int(0); --j) {
          if (vis[j]) continue;
          vis[j] = true;
          s[i] = s[len - i - 1] = j + 'a';
          break;
        }
        if (s[i] == '?') s[i] = s[len - i - 1] = 'a';
      }
    }
    bool flag = true;
    for (int i = int(0); i < int(k); ++i)
      if (!vis[i]) {
        flag = false;
        break;
      }
    if (flag)
      printf("%s\n", s);
    else
      printf("IMPOSSIBLE\n");
  }
}
