#include <bits/stdc++.h>
using namespace std;
long long d, x, y;
void extendedEuclid(long long A, long long B) {
  if (B == 0) {
    d = A;
    x = 1;
    y = 0;
  } else {
    extendedEuclid(B, A % B);
    int temp = x;
    x = y;
    y = temp - (A / B) * y;
  }
}
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long isPrime(long long n) {
  if (n == 0 || n == 1) return 0;
  if (n % 2 == 0) return 2;
  if (n % 3 == 0) return 3;
  for (long long i = 5; i * i <= n; i = i + 6) {
    if (n % i == 0) return i;
    if (n % (i + 2) == 0) return i + 2;
  }
  return n;
}
map<long long, long long> par, val;
void ini() {
  for (long long i = 0; i < 500010; i++) {
    par[i] = i;
  }
}
long long root(long long x) {
  while (par[x] != x) {
    par[x] = par[par[x]];
    x = par[x];
  }
  return x;
}
void uni(long long x, long long y) {
  x = root(x);
  y = root(y);
  if (val[x] <= val[y])
    par[y] = par[x];
  else
    par[x] = par[y];
}
vector<vector<long long> > v(200010);
vector<long long> ans;
map<long long, long long> vis;
long long dfs(long long n, long long d) {
  vis[n] = true;
  if (n == d) {
    if (ans.size() % 2 == 0) return 1;
    return 0;
  }
  for (long long i = 0; i < v[n].size(); i++) {
    if (!vis[v[x][i]]) {
      ans.push_back(v[x][i]);
      dfs(v[x][i], d);
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, m, i, j, k;
  cin >> k;
  string s;
  cin >> s;
  n = s.size();
  map<char, long long> fr;
  for (i = 0; i < s.size() / 2; i++) {
    if (s[i] != '?') {
      if (s[i] > k + 'a' - 1) {
        cout << "IMPOSSIBLE";
        return 0;
      }
      fr[s[i]]++;
      if (s[n - 1 - i] == '?')
        s[n - 1 - i] = s[i];
      else if (s[n - 1 - i] != s[i]) {
        cout << "IMPOSSIBLE";
        return 0;
      }
    } else if (s[n - 1 - i] != '?') {
      if (s[n - 1 - i] > k + 'a' - 1) {
        cout << "IMPOSSIBLE";
        return 0;
      }
      fr[s[n - 1 - i]]++;
      s[i] = s[n - 1 - i];
    }
  }
  if (n % 2 != 0 && s[n / 2] > k - 1 + 'a') {
    cout << "IMPOSSIBLE";
    return 0;
  }
  fr[s[n / 2]]++;
  if (n % 2 != 0 && s[n / 2] == '?') {
    char c = 'a';
    for (j = k - 1; j >= 0; j--) {
      if (fr[j + 'a'] == 0) {
        c = j + 'a';
        fr[j + 'a']++;
        break;
      }
    }
    s[n / 2] = c;
  }
  for (i = n / 2 - 1; i >= 0; i--) {
    if (s[i] == '?' && s[n - 1 - i] == '?') {
      char c = 'a';
      for (j = k - 1; j >= 0; j--) {
        if (fr[j + 'a'] == 0) {
          c = j + 'a';
          fr[j + 'a']++;
          break;
        }
      }
      s[i] = s[n - 1 - i] = c;
    }
  }
  for (j = 0; j < k; j++) {
    if (fr[j + 'a'] == 0) {
      cout << "IMPOSSIBLE";
      return 0;
    }
  }
  cout << s;
}
