#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const double EPS = 1e-9;
string s;
int k;
bool udah[30];
int nek() {
  for (int i = 0; i <= k; i++)
    if (!udah[i]) return i;
  return 0;
}
int blom = 0;
int main() {
  scanf("%d", &k);
  cin >> s;
  k--;
  int n = s.size();
  memset(udah, 0, sizeof(udah));
  for (int i = 0; i < n; i++)
    if (s[i] >= 'a' && s[i] <= 'z') udah[s[i] - 'a'] = 1;
  for (int i = 0; i <= k; i++) blom += !udah[i];
  vector<int> z;
  for (int i = 0; i < n; i++)
    if (s[i] != s[n - i - 1] || s[i] == '?')
      if (s[i] == '?') {
        if (s[n - i - 1] != '?') {
          s[i] = s[n - i - 1];
        } else if (i <= n - i - 1) {
          z.push_back(i);
        }
      } else if (s[n - i - 1] != '?') {
        printf("IMPOSSIBLE\n");
        return 0;
      }
  int m = z.size();
  if (m < blom) {
    printf("IMPOSSIBLE\n");
    return 0;
  }
  for (int i = 0; i < m - blom; i++) s[z[i]] = s[n - z[i] - 1] = 'a';
  for (int i = m - blom; i < m; i++) {
    int nn = nek();
    s[z[i]] = s[n - z[i] - 1] = (char)('a' + nn);
    udah[nn] = 1;
  }
  for (int i = 0; i <= k; i++)
    if (!udah[i]) {
      printf("IMPOSSIBLE\n");
      return 0;
    }
  cout << s << endl;
  return 0;
}
