#include <bits/stdc++.h>
using namespace std;
int main() {
  bool used[27];
  string str;
  int k, u = 0;
  cin >> k;
  cin >> str;
  bool flag = true;
  for (int i = 0; i < k; i++) used[i] = false;
  for (int i = 0; i < str.length(); i++)
    if (str[i] != '?') {
      used[(int)(str[i] - 'a')] = true;
      if ((int)(str[i] - 'a') >= k) flag = false;
    }
  int len = str.length() - 1;
  int pos;
  for (int i = 0; i < k; i++)
    if (used[i]) u++;
  if (len % 2 == 0)
    pos = len / 2 - 1;
  else
    pos = len / 2;
  int count = 0;
  if (flag)
    for (int i = 0; i <= pos; i++) {
      if (str[i] == '?' && str[len - i] != '?')
        str[i] = str[len - i];
      else if (str[len - i] == '?' && str[i] != '?')
        str[len - i] = str[i];
      if (str[len - i] != str[i]) {
        flag = false;
        break;
      }
    }
  for (int i = 0; i <= len; i++)
    if (str[i] == '?') count++;
  count = count / 2 + count % 2;
  u = k - u;
  if (flag) {
    for (int i = 0; i <= pos + 1; i++) {
      if (str[i] == '?') {
        if (count == u) {
          int fill = 0;
          for (int i1 = 0; i1 < k; i1++)
            if (!used[i1]) {
              fill = i1;
              break;
            }
          used[fill] = true;
          str[i] = (char)('a' + fill);
          str[len - i] = (char)('a' + fill);
          u--;
          count--;
        } else if (count > u) {
          str[i] = (char)('a');
          str[len - i] = (char)('a');
          count--;
        } else {
          flag = false;
          break;
        }
      }
    }
  }
  for (int i = 0; i < k; i++) used[i] = false;
  for (int i = 0; i <= len; i++)
    if (str[i] != '?') used[str[i] - 'a'] = true;
  u = 0;
  for (int i = 0; i < k; i++)
    if (used[i]) u++;
  if (u < k) flag = false;
  if (flag)
    cout << str << "\n";
  else
    cout << "IMPOSSIBLE\n";
  return 0;
}
