#include <bits/stdc++.h>
using namespace std;
int arr[1000];
char arr2[1000];
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    arr[s[i]]++;
  }
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (!arr['a' + i]) arr2[cnt++] = 'a' + i;
  }
  int nono = cnt;
  cnt = 0;
  int tata = 0;
  int num = s.size() - 1;
  n--;
  for (int i = 0; i < s.size(); i++) {
    if (num < i) break;
    if (s[num] == s[i] && s[i] == '?')
      tata++;
    else if (s[num] == '?')
      s[num] = s[i];
    else if (s[i] == '?')
      s[i] = s[num];
    else if (s[i] != s[num]) {
      cout << "IMPOSSIBLE";
      return 0;
    }
    if (s[i] > ('a' + n) || s[num] > ('a' + n)) {
      cout << "IMPOSSIBLE";
      return 0;
    }
    num--;
  }
  for (int i = 0; i < (s.size() + 1) / 2; i++) {
    if (s[i] == '?' && tata > nono) {
      tata--, s[i] = 'a';
      s[s.size() - i - 1] = 'a';
    } else if (s[i] == '?') {
      s[i] = arr2[cnt], s[s.size() - i - 1] = arr2[cnt++];
    }
  }
  memset(arr, 0, sizeof arr);
  for (int i = 0; i < s.size(); i++) {
    arr[s[i]]++;
  }
  for (int i = 0; i <= n; i++) {
    if (!arr['a' + i]) {
      cout << "IMPOSSIBLE";
      return 0;
    }
  }
  cout << s;
}
