#include <bits/stdc++.h>
const int inf_int = 2e9;
const long long inf_ll = 2e18;
const int maxn = 5e2 + 10;
using namespace std;
int main() {
  int n, l, f[30], f2[105], k = 1, fff;
  memset(f, 0, sizeof(f));
  char s[105];
  cin >> n;
  getchar();
  gets(s);
  l = strlen(s);
  if (l % 2 != 0)
    fff = l / 2 + 1;
  else
    fff = l / 2;
  for (int i = 0; i <= fff - 1; i++) {
    if (s[i] >= 'a' && s[i] <= 'z') {
      if (s[l - i - 1] >= 'a' && s[l - i - 1] <= 'z') {
        if (s[l - i - 1] != s[i]) {
          cout << "IMPOSSIBLE";
          return 0;
        }
      } else if (s[l - i - 1] == '?') {
        if (s[i] - 'a' + 1 > n) {
          cout << "IMPOSSIBLE";
          return 0;
        } else
          s[l - i - 1] = s[i];
      }
      f[s[i] - 'a' + 1] = 1;
    } else if (s[i] == '?') {
      if (s[l - i - 1] >= 'a' && s[l - i - 1] <= 'z') {
        if (s[l - i - 1] - 'a' + 1 > n) {
          cout << "IMPOSSIBLE";
          return 0;
        }
        f[s[l - i - 1] - 'a' + 1] = 1;
        s[i] = s[l - i - 1];
      } else if (s[l - i - 1] == '?') {
        f2[k++] = i;
      }
    }
  }
  int j = k - 1;
  for (int i = n; i >= 1; i--) {
    if (f[i] == 0) {
      if (j >= 1) {
        s[f2[j]] = 'a' + i - 1;
        s[l - f2[j] - 1] = 'a' + i - 1;
        j--;
      } else {
        cout << "IMPOSSIBLE";
        return 0;
      }
    }
  }
  for (int i = j; i >= 1; i--) {
    s[f2[i]] = 'a';
    s[l - f2[i] - 1] = 'a';
  }
  for (int i = 0; i < l; i++) cout << s[i];
  return 0;
}
