#include <bits/stdc++.h>
using namespace std;
char s[110];
int main() {
  int k;
  scanf("%d\n", &k);
  gets(s);
  int n = strlen(s);
  for (int(i) = (0); (i) < (n); ++i)
    if (s[i] == '?' && s[n - i - 1] != '?' ||
        s[i] != '?' && s[n - i - 1] == '?') {
      s[i] = (s[i] == '?' ? s[n - i - 1] : s[i]);
      s[n - i - 1] = (s[n - i - 1] == '?' ? s[i] : s[n - i - 1]);
    }
  int yet = 0;
  int cnt[26];
  memset((cnt), 0, sizeof(cnt));
  for (int(i) = (0); (i) < (n); ++i)
    if (s[i] >= 'a' && s[i] <= 'z' && s[n - i - 1] >= 'a' &&
        s[n - i - 1] <= 'z' && s[i] != s[n - i - 1]) {
      printf("IMPOSSIBLE");
      exit(0);
    }
  for (int(i) = (0); (i) < (n); ++i)
    if (s[i] != '?') cnt[s[i] - 'a']++;
  for (int(i) = (0); (i) < (n); ++i)
    if (s[i] - 'a' >= k) {
      printf("IMPOSSIBLE");
      exit(0);
    }
  vector<char> need;
  for (int(i) = (0); (i) < (k); ++i)
    if (cnt[i] > 0)
      ++yet;
    else
      need.push_back(i + 'a');
  int free = 0;
  for (int(i) = (0); (i) < ((1 + n) / 2); ++i) {
    if (s[i] == '?') {
      ++free;
    }
  }
  if (free < (int)(need).size()) {
    printf("IMPOSSIBLE");
    exit(0);
  }
  int rr = free - (int)(need).size();
  vector<pair<int, char> > v;
  if (rr > 0) v.push_back(make_pair(rr, 'a'));
  for (int(i) = (0); (i) < ((int)(need).size()); ++i)
    v.push_back(make_pair(1, need[i]));
  for (int(i) = (0); (i) < (n); ++i) {
    if (s[i] == '?') {
      int t = -1;
      ;
      for (int j = 0; j < (int)(v).size(); ++j)
        if (v[j].first > 0) {
          t = j;
          break;
        }
      s[i] = s[n - i - 1] = v[t].second;
      v[t].first--;
    }
  }
  puts(s);
  return 0;
}
