#include <bits/stdc++.h>
using namespace std;
bool u[27], c;
string s;
set<int> s1;
int k, l;
int main() {
  scanf("%d", &k);
  cin >> s;
  for (int i = 0; i < s.size(); ++i)
    if (s[i] != '?') u[int(s[i] - 'a')] = 1;
  if (s.size() % 2 == 1 && s[s.size() / 2] == '?') {
    for (int i = k - 1; i >= 0; --i)
      if (!u[i]) {
        u[i] = 1;
        l = i;
        break;
      }
    s[s.size() / 2] = char(l + 'a');
  }
  for (int i = k - 1; i >= 0; --i)
    if (!u[i]) {
      l = i;
      break;
    }
  int r = (s.size() + 1) / 2 - 1;
  for (int i = s.size() / 2 - 1; i >= 0; --i) {
    ++r;
    if (s[i] == '?' && s[r] != '?') s[i] = s[r];
    if (s[i] != '?' && s[r] == '?') s[r] = s[i];
    if (s[i] != s[r]) {
      cout << "IMPOSSIBLE";
      return 0;
    }
    if (s[i] == '?' && s[r] == '?') {
      u[l] = 1;
      s[i] = s[r] = l + 'a';
      c = 0;
      for (int i = l - 1; i >= 0; --i) {
        if (!u[i]) {
          l = i;
          c = 1;
          break;
        }
      }
      if (c == 0) l = 0;
    }
  }
  for (int i = 0; i < s.size(); ++i) s1.insert(int(s[i] - 'a'));
  if (s1.size() != k)
    cout << "IMPOSSIBLE";
  else
    cout << s;
  return 0;
}
