#include <bits/stdc++.h>
using namespace std;
vector<long long> v[301], vv, v1;
long long a, b, c[1234567], c1[1234][1234], e, d[1234567], i, j, n, x, y, l, r,
    k;
string s, s1;
long long used[301];
long long ans, sum;
bool ok[123];
set<long long> se;
int main() {
  cin >> n;
  string s;
  cin >> s;
  l = 0;
  r = s.size() - 1;
  while (l <= r) {
    if (l == r) {
      if (s[l] != '?') c[s[l]]++;
      break;
    }
    if (s[l] != '?') {
      if (s[r] != '?') {
        if (s[l] != s[r]) {
          cout << "IMPOSSIBLE";
          exit(0);
        } else {
          c[s[l]]++;
        }
      } else {
        s[r] = s[l];
        c[s[l]]++;
      }
    } else {
      if (s[r] != '?') {
        s[l] = s[r];
        c[s[l]]++;
      }
    }
    l++;
    r--;
  }
  while (l >= 0) {
    if (s[l] == s[r] && s[l] == '?') {
      x = 'a';
      for (int i = 'a' + n - 1; i >= 'a'; i--) {
        if (c[i] == 0) {
          x = i;
          break;
        }
      }
      c[x]++;
      s[l] = x;
      s[r] = x;
    }
    l--;
    r++;
  }
  bool okk = true;
  for (long long i = 'a'; i <= 'a' + n - 1; i++)
    if (c[i] == 0) okk = false;
  if (okk == true)
    cout << s;
  else
    cout << "IMPOSSIBLE";
}
