#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  string s;
  cin >> s;
  set<char> a;
  for (int i = 0; i < k; i++) {
    a.insert((char)('a' + i));
  }
  int l = s.length();
  vector<int> sa(26);
  int kz = 0;
  int kost = k;
  for (int i = 0; i < l / 2; i++) {
    if (s[i] == '?' && s[l - i - 1] != '?') {
      s[i] = s[l - i - 1];
      if (!sa[s[i] - 'a']) {
        kost--;
      }
      sa[s[i] - 'a'] = 1;
      continue;
    }
    if (s[i] != '?' && s[l - i - 1] == '?') {
      s[l - i - 1] = s[i];
      if (!sa[s[i] - 'a']) {
        kost--;
      }
      sa[s[i] - 'a'] = 1;
      continue;
    }
    if (s[i] != '?' && s[l - i - 1] != '?' && s[i] != s[l - i - 1]) {
      cout << "IMPOSSIBLE";
      return 0;
    }
    if (s[i] == s[l - i - 1] && s[i] == '?') {
      kz++;
      continue;
    }
    if (s[i] == s[l - i - 1]) {
      if (!sa[s[i] - 'a']) {
        kost--;
      }
      sa[s[i] - 'a'] = 1;
    }
  }
  if (l & 1) {
    int in = l / 2;
    if (s[in] == '?') {
      kz++;
    } else {
      if (!sa[s[in] - 'a']) {
        kost--;
      }
      sa[s[in] - 'a'] = 1;
    }
  }
  if (kost > kz) {
    cout << "IMPOSSIBLE";
    return 0;
  }
  vector<int> sa2;
  for (int i = 0; i < k; i++) {
    if (!sa[i]) {
      sa2.push_back(i);
    }
  }
  string s2 = s.substr(0, (l + 1) / 2);
  for (int i = s2.length() - 1; i >= 0; i--) {
    if (s2[i] != '?') continue;
    if (!sa2.empty()) {
      s2[i] = (char)(sa2.back() + 'a');
      sa2.pop_back();
    } else {
      s2[i] = 'a';
    }
  }
  cout << s2;
  reverse(s2.begin(), s2.end());
  int p;
  if (l & 1)
    p = 1;
  else
    p = 0;
  for (int i = p; i < s2.length(); i++) cout << s2[i];
  return 0;
}
