#include <bits/stdc++.h>
int main() {
  std::string str;
  int k;
  std::cin >> k >> str;
  int n = 0;
  std::vector<bool> known(k, false);
  for (int i = 0; i < str.length(); ++i) {
    if (str[i] != '?') {
      if (!known[str[i] - 'a']) {
        n += 1;
      }
      known[str[i] - 'a'] = true;
    }
  }
  n = k - n;
  bool ok = true;
  int free = 0;
  for (int i = 0; i < str.length(); ++i) {
    char sym = str[i];
    char opposite = str[str.length() - i - 1];
    if (sym == '?') {
      if (opposite != '?') {
        str[i] = opposite;
      } else {
        if (i < (str.length() + 1) / 2) {
          free += 1;
        }
      }
    } else {
      if (opposite != '?' && opposite != sym) {
        ok = false;
      }
    }
  }
  int pos = 0;
  for (int i = 0; i < str.length(); ++i) {
    if (str[i] == '?') {
      if (free == n) {
        while (pos + 1 < k && known[pos]) {
          pos += 1;
        }
      }
      str[i] = str[str.length() - i - 1] = 'a' + pos;
      if (!known[pos]) {
        n -= 1;
      }
      known[pos] = true;
      free -= 1;
    }
  }
  while (pos + 1 < k && known[pos]) {
    pos += 1;
  }
  if (ok && pos + 1 == k && known[pos]) {
    std::cout << str;
  } else {
    std::cout << "IMPOSSIBLE";
  }
  return 0;
}
