#include <bits/stdc++.h>
using namespace std;
const long long OO = 0x0101010101010101;
class debug_t {
 public:
  template <typename T>
  debug_t& operator<<(const T& o) {
    return *this;
  }
} dout;
bool vis[300005];
int main() {
  ios_base::sync_with_stdio(false);
  int k;
  cin >> k;
  string s;
  cin >> s;
  int n = s.size();
  vector<int> ve;
  for (int i = 0; i < (n + 1) / 2; i++) {
    if (s[i] == '?')
      if (s[n - i - 1] == '?')
        ve.push_back(i);
      else
        s[i] = s[n - i - 1];
    else if (s[n - i - 1] == '?')
      s[n - i - 1] = s[i];
    else if (s[n - i - 1] - s[i]) {
      cout << "IMPOSSIBLE\n";
      return 0;
    }
    vis[s[i]] = true;
  }
  vector<char> vec;
  for (int i = 0; i < k; i++)
    if (!vis[i + 'a']) vec.push_back(i + 'a');
  if (vec.size() > ve.size()) {
    cout << "IMPOSSIBLE\n";
    return 0;
  }
  int dif = ve.size() - vec.size();
  sort(ve.begin(), ve.end());
  for (int i = 0; i < dif; i++) s[ve[i]] = s[n - ve[i] - 1] = 'a';
  int i = 0;
  for (int j = dif; j < ve.size(); j++)
    s[ve[j]] = s[n - ve[j] - 1] = vec[(i++) % vec.size()];
  cout << s << "\n";
  dout << "\nExecution Time = " << clock() * 1.0 / CLOCKS_PER_SEC << '\n';
}
