#include <bits/stdc++.h>
using namespace std;
bool is_palindrome(const string &s, int start, int end) {
  int sz = end - start + 1;
  if (sz % 2 == 0) {
    int middle = start + sz / 2;
    int i;
    for (i = 0; middle - 1 - i >= 0 && middle + i <= end &&
                s[middle - 1 - i] == s[middle + i];
         i++)
      ;
    if (middle - i - 1 < 0 || middle + i > end) return true;
  } else {
    int middle = start + sz / 2;
    int i;
    for (i = 1;
         middle - i >= 0 && middle + i <= end && s[middle - i] == s[middle + i];
         i++)
      ;
    if (middle - i < 0 || middle + i > end) return true;
  }
  return false;
}
int euclidd, euclidx, euclidy;
void extendedeuclid(int a, int b) {
  if (b == 0) {
    euclidd = a;
    euclidx = 1;
    euclidy = 0;
    return;
  }
  extendedeuclid(b, a % b);
  int d1, x1, y1;
  d1 = euclidd;
  x1 = euclidx;
  y1 = euclidy;
  euclidx = y1;
  euclidy = x1 - ((a / b) * y1);
}
double area_triangle(double x1, double y1, double x2, double y2, double x3,
                     double y3) {
  double a;
  a = x1 * (y2 - y3) + y1 * (x3 - x2) + ((x2 * y3) - (y2 * x3)) + 1e-9;
  a = a / 2 + 1e-9;
  return a;
}
double dist_2point(double x1, double y1, double x2, double y2) {
  double d;
  d = sqrt(pow((x1 - x2), 2) + pow((y1 - y2), 2));
  return d;
}
int binary_search(int a[], int n, int l, int u) {
  int mid;
  if (l > u) return 0;
  mid = floor(l + u) / 2;
  if (a[mid] == n)
    return mid;
  else if (a[mid] > n)
    binary_search(a, n, l, mid - 1);
  else
    binary_search(a, n, mid + 1, u);
}
long gcd(long a, long b) {
  while (b > 0) {
    a = a % b;
    a = a ^ b;
    b = b ^ a;
    a = a ^ b;
  }
  return a;
}
long lcm(long a, long b) {
  long x = (a * b) / gcd(a, b);
  return x;
}
long is_prime(long n) {
  long ii;
  if (n == 1) return 0;
  if (n == 2) return 1;
  if (n % 2 == 0) return 0;
  for (ii = 3; ii * ii <= n; ii = ii + 2)
    if (n % ii == 0) return 0;
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  long n;
  while (scanf("%ld", &n) != EOF) {
    char a[200] = {0};
    long l, i, j, k, pj[200] = {0}, p, ar[200] = {0}, f;
    scanf("%s", a);
    l = strlen(a);
    for (i = 0; i < l; i++) {
      if (pj[a[i]] == 0 && a[i] != '?') {
        pj[a[i]] = 1;
      }
    }
    p = 0;
    f = 0;
    for (i = 0; i < (l + 1) / 2; i++) {
      if (a[i] == '?' && a[l - i - 1] == '?') {
        ar[p++] = i;
      } else if (a[i] == '?' || a[l - i - 1] == '?') {
        if (a[l - i - 1] == '?')
          a[l - i - 1] = a[i];
        else
          a[i] = a[l - i - 1];
      } else if (a[i] != a[l - i - 1]) {
        f = 1;
        break;
      }
    }
    if (f) {
      printf("IMPOSSIBLE\n");
      continue;
    }
    k = 1;
    for (i = p - 1; i >= 0; i--) {
      long ps = ar[i];
      for (j = n - 1; j >= 0 && k; j--) {
        if (pj[j + 97] == 0) {
          a[ps] = j + 97;
          a[l - ps - 1] = j + 97;
          pj[j + 97] = 1;
          break;
        }
      }
      if (j == -1 || k == 0) {
        k = 0;
        a[ps] = 97;
        a[l - ps - 1] = 97;
      }
    }
    for (j = 0; j < n; j++)
      if (pj[j + 97] == 0) {
        f = 1;
        break;
      }
    if (f == 0)
      printf("%s\n", a);
    else
      printf("IMPOSSIBLE\n");
  }
  return 0;
}
