#include <bits/stdc++.h>
using namespace std;
long long get() {
  char c = getchar();
  long long x = 0LL;
  while (c < '0' || c > '9') c = getchar();
  while (c >= '0' && c <= '9') {
    x *= 10LL;
    x += (c - '0');
    c = getchar();
  }
  return x;
}
string s;
int k;
bool f[26];
int main() {
  ios::sync_with_stdio(0);
  cin >> k >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != '?' && s[s.size() - 1 - i] != '?' &&
        s[i] != s[s.size() - 1 - i]) {
      cout << "IMPOSSIBLE";
      return 0;
    }
  }
  for (int i = 0; i < s.size(); i++) {
    if (s[i] != '?') {
      f[s[i] - 'a'] = true;
      s[s.size() - 1 - i] = s[i];
    }
  }
  int sum = 0;
  for (int i = (s.size() + 1) / 2 - 1; i >= 0; i--)
    if (s[i] == '?') sum++;
  for (int i = 0; i < k; i++)
    if (!f[i]) sum--;
  if (sum < 0) {
    cout << "IMPOSSIBLE";
    return 0;
  }
  k--;
  for (int i = (s.size() + 1) / 2 - 1; i >= 0; i--) {
    if (s[i] != '?') continue;
    while (k > 0 && f[k]) k--;
    f[k] = true;
    s[i] = s[s.size() - i - 1] = ('a' + k);
  }
  cout << s;
  return 0;
}
