#include <bits/stdc++.h>
using namespace std;
int k, n;
string s, a;
vector<char> c;
int u[26];
int main() {
  cin >> k;
  cin >> s;
  int n = s.size(), cur = 0;
  memset(u, 0, sizeof(u));
  for (int i = 0; i < n; i++) {
    if (s[i] != '?' && s[n - i - 1] != '?' && s[i] != s[n - i - 1]) {
      cout << "IMPOSSIBLE" << endl;
      return 0;
    }
    char v = '?';
    if (s[i] != '?') v = s[i];
    if (s[n - i - 1] != '?') v = s[n - i - 1];
    s[i] = s[n - i - 1] = v;
    if (s[i] != '?') u[s[i] - 97] = 1;
  }
  c.clear();
  for (int i = 0; i < k; i++)
    if (!u[i]) c.push_back(char(97 + i));
  a = "";
  for (int i = 0; i < n / 2; i++) a += s[i];
  if (n & 1) a += s[n / 2];
  for (int i = 0; i < a.size(); i++)
    if (a[i] == '?') cur++;
  if (cur < c.size()) {
    cout << "IMPOSSIBLE" << endl;
    return 0;
  }
  for (; cur - c.size();) c.push_back('a');
  sort(c.begin(), c.end());
  vector<char>::iterator it = c.begin();
  for (int i = 0; i < a.size(); i++)
    if (a[i] == '?') a[i] = *it, it++;
  for (int i = 0; i < a.size(); i++) s[i] = a[i];
  for (int i = a.size(); i < n; i++) s[i] = s[n - i - 1];
  cout << s << endl;
  return 0;
}
