#include <bits/stdc++.h>
using namespace std;
const int N = 101;
int n, k;
int ile[26];
char tab[N];
int main() {
  scanf("%d", &k);
  scanf("%s", tab);
  n = strlen(tab);
  bool ok = true;
  for (int i = 0; i < (n / 2); ++i) {
    if (tab[i] == '?' && tab[n - i - 1] == '?')
      continue;
    else if (tab[i] == '?')
      tab[i] = tab[n - i - 1];
    else if (tab[n - i - 1] == '?')
      tab[n - i - 1] = tab[i];
    else {
      if (tab[i] != tab[n - i - 1]) ok = false;
    }
  }
  if (!ok)
    printf("IMPOSSIBLE\n");
  else {
    for (int i = 0; i < ((n + 1) / 2); ++i) {
      if (tab[i] == '?')
        continue;
      else {
        if (tab[i] - 'a' < k)
          ile[tab[i] - 'a'] = true;
        else
          ok = false;
      }
    }
    if (!ok)
      printf("IMPOSSIBLE\n");
    else {
      int kon = (n - 1) / 2;
      int wol = 0;
      int lit = 0;
      for (int i = 0; i < (kon + 1); ++i) {
        if (tab[i] == '?') wol++;
      }
      for (int j = 0; j < (k); ++j) {
        if (ile[j] == 0) lit++;
      }
      if (wol < lit) {
        printf("IMPOSSIBLE\n");
      } else {
        int pos = kon;
        while (lit) {
          if (tab[pos] != '?') {
            pos--;
            continue;
          }
          int c = k - 1;
          while (ile[c]) c--;
          tab[pos] = tab[n - pos - 1] = c + 'a';
          ile[c]++;
          lit--;
          pos--;
        }
        for (int i = 0; i < (kon + 1); ++i) {
          if (tab[i] == '?') {
            tab[i] = tab[n - i - 1] = 'a';
          }
        }
        printf("%s\n", tab);
      }
    }
  }
}
