#include <bits/stdc++.h>
using namespace std;
int a[30];
char s[110];
int main() {
  int k, i, l, f, j;
  cin >> k >> s;
  l = strlen(s);
  if (l < (2 * k - 1)) {
    cout << "IMPOSSIBLE";
    return 0;
  }
  for (i = 0; i < l; i++) {
    if (s[i] != '?') a[s[i] - 'a']++;
  }
  for (i = (l - 1) / 2; i >= 0; i--) {
    if (s[i] != '?') {
      if ((s[i] - 'a' >= k) || (s[l - 1 - i] != '?' && s[i] != s[l - 1 - i])) {
        cout << "IMPOSSIBLE";
        return 0;
      } else {
        a[s[i] - 'a']++;
        s[l - 1 - i] = s[i];
      }
    } else {
      if (s[l - i - 1] != '?') {
        if (s[i] - 'a' >= k) {
          cout << "IMPOSSIBLE";
          return 0;
        } else {
          s[i] = s[l - i - 1];
          a[s[l - 1 - i] - 'a']++;
        }
      } else {
        f = 0;
        for (j = k - 1; j >= 0; j--) {
          if (a[j] == 0) {
            f = 1;
            s[i] = 'a' + j;
            s[l - 1 - i] = 'a' + j;
            a[j]++;
            break;
          }
        }
        if (f == 0) {
          s[i] = 'a';
          s[l - i - 1] = 'a';
        }
      }
    }
  }
  for (i = 0; i < k; i++) {
    if (a[i] == 0) {
      cout << "IMPOSSIBLE";
      return 0;
    }
  }
  cout << s;
  return 0;
}
