#include #include #include using namespace std; typedef long long ll; int main() { cin.sync_with_stdio(false); cin.tie(); cout.tie(); int n; cin >> n; string s; cin >> s; vector v; for (int i = 0; i < n; i++) { if (s[i] == s[n - 1]) v.push_back(i); } for (int i = 0; i < v.size(); i++) { if (s[v[i]] == s[n - 1]) { int b = n - 1; int a = v[i]; bool cc = true; while (a < b) { if (s[a] != s[b]) { cc = false; break; } a ++; b--; } if (cc) { cout<