#include <bits/stdc++.h>
using namespace std;
bool vis[1000];
string make(string s, int k) {
  memset(vis, false, sizeof vis);
  int n = (int)s.size();
  for (int i = 0; i < n; i++)
    if (s[i] == '?' && s[n - i - 1] != '?') s[i] = s[n - i - 1];
  for (int i = 0; i < n; i++)
    if (s[i] != '?') vis[s[i] - 'a'] = true;
  for (int i = k - 1; i >= 0; i--)
    if (vis[i] == false) {
      char c = 'a' + i;
      for (int j = n / 2; j < n; j++)
        if (s[j] == '?') {
          s[j] = s[n - j - 1] = c;
          break;
        }
    }
  for (int i = 0; i < n; i++)
    if (s[i] == '?') s[i] = s[n - i - 1] = 'a';
  return s;
}
bool valid(string s, int k) {
  memset(vis, false, sizeof vis);
  int n = (int)s.size();
  if (n < 2 * k - 1) return 0;
  for (int i = 0; i < n; i++) vis[s[i] - 'a'] = true;
  for (int i = 0; i < k; i++)
    if (vis[i] == false) return 0;
  for (int i = 0; i < n; i++)
    if (s[i] - 'a' > k - 1) return 0;
  for (int i = 0; i < n; i++)
    if (s[i] != s[n - i - 1]) return 0;
  return 1;
}
int main() {
  int k;
  string s;
  cin >> k >> s;
  s = make(s, k);
  if (valid(s, k))
    cout << s << endl;
  else
    cout << "IMPOSSIBLE" << endl;
  return 0;
}
