#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  char a[110];
  bool map[300] = {0};
  cin >> a;
  int i = 0, j = strlen(a) - 1;
  if (j == 0) {
    if (k == 1 && a[j] == '?')
      cout << 'a' << endl;
    else if (k == 1)
      cout << a << endl;
    else
      cout << "IMPOSSIBLE" << endl;
    return 0;
  }
  while (i < j) {
    if (a[i] != '?' && a[j] != '?' && a[i] == a[j])
      map[a[i] - 'a' + 1] = true, i++, j--;
    else if (a[i] == '?' && a[j] == '?') {
      i++, j--;
      continue;
    } else if (a[i] == '?' && a[j] != '?') {
      a[i] = a[j];
      map[a[i] - 'a' + 1] = true;
      i++;
      j--;
    } else if (a[i] != '?' && a[j] == '?') {
      a[j] = a[i];
      map[a[i] - 'a' + 1] = true;
      i++;
      j--;
    } else if (a[i] != a[j]) {
      cout << "IMPOSSIBLE" << endl;
      return 0;
    }
  }
  if (i == j) {
    if (a[i] != '?') map[a[i]] = true;
  }
  while (i >= 0) {
    if (map[k] == true && k > 1) {
      k--;
      continue;
    } else if (a[i] == '?') {
      a[i] = a[j] = 'a' + k - 1;
      i--, j++;
      map[k] = true;
    } else {
      i--;
      j++;
    }
  }
  if (k == 1 && map[k] == true)
    cout << a << endl;
  else
    cout << "IMPOSSIBLE" << endl;
  return 0;
}
