#include <bits/stdc++.h>
using namespace std;
bool vis[26];
vector<pair<int, int> > pos;
int main() {
  bool f = false;
  int k, res = 0;
  string str;
  cin >> k >> str;
  for (int i = 0, j = str.length() - 1; i <= j; i++, j--) {
    if (str[i] == str[j] && str[i] == '?') {
      pos.push_back(make_pair((i), (j)));
      str[i] = str[j] = 97;
    } else {
      if (str[i] == '?')
        str[i] = str[j];
      else if (str[j] == '?')
        str[j] = str[i];
      else if (str[i] != str[j])
        f = true;
      if (str[i] > 96 + k || str[j] > 96 + k) f = true;
      vis[str[i] - 97] = true;
    }
  }
  for (int i = pos.size(), j = k - 1; j >= 0; j--) {
    if (!vis[j]) {
      if (--i < 0) {
        f = true;
        break;
      } else {
        str[pos[i].first] = str[pos[i].second] = j + 97;
      }
    }
  }
  if (f)
    cout << "IMPOSSIBLE" << endl;
  else
    cout << str << endl;
  return 0;
}
