n = int(input()) s = input() l = len(s) s += s ans = 0
for i inrange(l): ans = 0 string = s[i:i+n] # print(string) lenght = len(string) for i inrange(lenght): left = i right = i while (left != -1and right != -1) and (left != lenght and right != lenght) and string[left] == string[right]: ans += 1 # print(ans, s[left:right+1]) left -= 1 right += 1 for i inrange(lenght-1): left = i right = i+1 while (left != -1and right != -1) and (left != lenght and right != lenght) and string[left] == string[right]: ans += 1 # print(ans, s[left:right+1]) left -= 1 right += 1 print(ans) # print("="*20)
#define int long long #define burst ios::sync_with_stdio(0); cin.tie(0);
signedmain(){ burst int n; string s; cin >> n >> s; int l = s.length(); s += s; for(int i = 0; i < l; i++){ int ans = 0; string str = s.substr(i,n); int len = str.length(); for(int j = 0; j < len; j++){ int left = j; int right = j; while(left != -1 && right != -1 && left != len && right != len && str[left] == str[right]){ ans += 1; left -= 1; right += 1; } } for(int j = 0; j < len-1; j++){ int left = j; int right = j+1; while(left != -1 && right != -1 && left != len && right != len && str[left] == str[right]){ ans += 1; left -= 1; right += 1; } } cout << ans << "\n"; } return0; }