#include <bits/stdc++.h>
using namespace std;
bool isOK[30];
char str[150];
int isEmpty[150];
int main() {
  int n;
  cin >> n;
  cin >> str;
  int isEmptyIndex = 0;
  int index = 0;
  isEmptyIndex = 0;
  while (str[index + 1]) index++;
  bool ans = true;
  for (int i = 0; i <= index / 2; i++) {
    if (str[i] == '?') {
      if (str[index - i] != '?') {
        str[i] = str[index - i];
        isOK[str[i] - 'a'] = true;
      } else {
        str[i] = 'a';
        str[index - i] = 'a';
        isEmpty[isEmptyIndex++] = i;
      }
    } else if (str[index - i] == '?') {
      str[index - i] = str[i];
      isOK[str[i] - 'a'] = true;
    } else if (str[index - i] != str[i]) {
      ans = false;
      break;
    } else
      isOK[str[i] - 'a'] = true;
  }
  if (ans == true) {
    bool sw = true;
    for (int i = n - 1; i >= 0 && sw; i--) {
      if (isOK[i] == false) {
        if (isEmptyIndex == false) {
          sw = false;
          ans = false;
        } else {
          int k = isEmpty[isEmptyIndex - 1];
          isEmptyIndex--;
          str[k] = str[index - k] = 'a' + i;
        }
      }
    }
  }
  if (ans == true)
    cout << str << endl;
  else
    cout << "IMPOSSIBLE" << endl;
}
