#include <bits/stdc++.h>
int main() {
  char str[105];
  int k, i, j, len, pos[30], loc[105], cnt;
  while (scanf("%d", &k) != EOF) {
    scanf("%s", str);
    len = strlen(str);
    memset(pos, 0, sizeof(pos));
    for (i = 0, cnt = 0, j = len - 1; i <= j; i++, j--) {
      if (str[i] != '?' && str[j] != '?') {
        if (str[i] != str[j])
          break;
        else if (str[i] - 'a' + 1 > k)
          break;
        else {
          pos[str[i] - 'a' + 1] = 1;
        }
      } else {
        if (str[i] == '?' && str[j] != '?') {
          str[i] = str[j];
          pos[str[i] - 'a' + 1] = 1;
          if (str[j] - 'a' + 1 > k) break;
        } else if (str[j] == '?' && str[i] != '?') {
          str[j] = str[i];
          pos[str[i] - 'a' + 1] = 1;
          if (str[i] - 'a' + 1 > k) break;
        } else {
          loc[cnt++] = i;
        }
      }
    }
    if (i < j)
      printf("IMPOSSIBLE\n");
    else {
      for (i = cnt - 1; i >= 0; i--) {
        for (j = k; j >= 1; j--) {
          if (pos[j] == 0) {
            str[loc[i]] = str[len - 1 - loc[i]] = 'a' + j - 1;
            pos[j] = 1;
            break;
          }
        }
        if (j == 0) str[loc[i]] = str[len - 1 - loc[i]] = 'a';
      }
      for (j = 1; j <= k; j++) {
        if (pos[j] == 0) break;
      }
      if (j <= k)
        printf("IMPOSSIBLE\n");
      else
        printf("%s\n", str);
    }
  }
}
