// #include C { #include #include #include #include #include // } // #include C++ { #include #include #include #include #include #include #include #include #include #include #include #include #include // } using namespace std; // #typedef { typedef long long int64; typedef unsigned long long uint64; typedef pair PII; typedef pair PLL; typedef pair PDD; // } // #parameter{ #define LEN 2 #ifdef DEBUG_MODE #define TYPE decltype #define RF(filename) {freopen((filename), "r", stdin);} #define WF(filename) {freopen((filename), "w", stdout);} #define DEBUG printf #else #define TYPE __typeof #define RF(filename) {;} #define WF(filename) {;} #define DEBUG(...) #endif // #define { #define SZ(a) ((int)(a).size()) #define X first #define Y second #define MP make_pair #define L(x) ((x)<<1) #define R(x) ((x)<<1 | 1) #define max3(x, y, z) (max(max((x), (y)), (z))) #define min3(x, y, z) (min(min((x), (y)), (z))) #define BIT(x, i) (((x) >> (i)) & 1) #define ALL(it) (it).begin(), (it).end() #define FOR(it, c) for( TYPE((c).begin()) it = (c).begin(); it != (c).end(); it++) ///////////////////////////////////////////////////////////// const double PI = acos(-1.0); const double EPS = 1e-6; #define MAX_N 1005 #define MAX_M 5005 #define MAXX 0x3f #define UPPER 2147483647LL #define INF ((1 << 30) - 1) #define BINF ((1LL << 62) - 1LL) #define NONE -1 #define NIL 0 // } ///////////////////////////////////////////////////////////// char s[MAX_N]; bitset mark; int n; bool found; void DFS(int depth){ if (found) return; if (depth == n){ bool palindrome = true; for (int i = 0, j = n - 1; i < j; i++, j--){ if (s[i] != s[j]){ palindrome = false; break; } } if (palindrome) return; puts(s); found = true; return; } if (mark[depth]){ for (char ch = 'a'; ch <= 'z' && !found; ch++){ s[depth] = ch; DFS(depth + 1); } } else DFS(depth + 1); } ///////////////////////////////////////////////////////////// int main(){ RF("input.txt"); //WF("output.txt"); while (~scanf("%d", &n)){ scanf("%s", s); mark.reset(); for (int i = 0; i < n; i++) if(s[i] == '?') mark[i] = true; found = false; DFS(0); if (!found) puts("QwQ"); } return 0; }