#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e6 + 5;
const int mod = 998244353;
const int P = 131;
long long qpow(long long a, long long b) {
  long long ans = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
  }
  return ans;
}
long long gcd(long long a, long long b) { return b > 0 ? gcd(b, a % b) : a; }
int n, m, T;
int a[maxn];
long long p[maxn], sum[maxn];
char s[maxn];
void Hash() {
  p[0] = 1;
  for (int i = 1; i <= n; i++) {
    p[i] = p[i - 1] * P % mod;
    sum[i] = (sum[i - 1] * P % mod + s[i] - 'a' + 1) % mod;
  }
}
long long hs(int L, int R) {
  return (sum[R] - sum[L - 1] * p[R - L + 1] % mod + mod) % mod;
}
int ans[maxn];
int main() {
  cin >> n;
  cin >> s + 1;
  Hash();
  m = (n + 1) / 2;
  int l, r;
  if (n & 1)
    ans[m] = -1, l = r = m;
  else {
    l = m;
    r = m + 1;
    if (s[l] == s[r])
      ans[m] = 1;
    else
      ans[m] = -1;
  }
  for (int i = m - 1; i >= 1; i--) {
    l--, r++;
    for (int len = ans[i + 1] + 2; len >= -1; len -= 2) {
      if (hs(l, l + len - 1) == hs(r - len + 1, r) || len == -1) {
        ans[i] = len;
        break;
      }
    }
  }
  for (int i = 1; i <= m; i++) {
    cout << ans[i] << " \n"[i == m];
  }
  return 0;
}

### Prompt

Construct a Cpp code solution to the problem outlined:

You are given a string s consisting of n lowercase Latin letters.

Let's denote k-substring of s as a string subsk = sksk + 1..sn + 1 - k. Obviously, subs1 = s, and there are exactly <image> such substrings.

Let's call some string t an odd proper suprefix of a string T iff the following conditions are met:

  * |T| > |t|; 
  * |t| is an odd number; 
  * t is simultaneously a prefix and a suffix of T.



For evey k-substring (<image>) of s you have to calculate the maximum length of its odd proper suprefix.

Input

The first line contains one integer n (2 ≤ n ≤ 106) — the length s.

The second line contains the string s consisting of n lowercase Latin letters.

Output

Print <image> integers. i-th of them should be equal to maximum length of an odd proper suprefix of i-substring of s (or  - 1, if there is no such string that is an odd proper suprefix of i-substring).

Examples

Input

15
bcabcabcabcabca


Output

9 7 5 3 1 -1 -1 -1


Input

24
abaaabaaaabaaabaaaabaaab


Output

15 13 11 9 7 5 3 1 1 -1 -1 1


Input

19
cabcabbcabcabbcabca


Output

5 3 1 -1 -1 1 1 -1 -1 -1

Note

The answer for first sample test is folowing: 

  * 1-substring: bcabcabcabcabca
  * 2-substring: cabcabcabcabc
  * 3-substring: abcabcabcab
  * 4-substring: bcabcabca
  * 5-substring: cabcabc
  * 6-substring: abcab 
  * 7-substring: bca 
  * 8-substring: c 

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e6 + 5;
const int mod = 998244353;
const int P = 131;
long long qpow(long long a, long long b) {
  long long ans = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
  }
  return ans;
}
long long gcd(long long a, long long b) { return b > 0 ? gcd(b, a % b) : a; }
int n, m, T;
int a[maxn];
long long p[maxn], sum[maxn];
char s[maxn];
void Hash() {
  p[0] = 1;
  for (int i = 1; i <= n; i++) {
    p[i] = p[i - 1] * P % mod;
    sum[i] = (sum[i - 1] * P % mod + s[i] - 'a' + 1) % mod;
  }
}
long long hs(int L, int R) {
  return (sum[R] - sum[L - 1] * p[R - L + 1] % mod + mod) % mod;
}
int ans[maxn];
int main() {
  cin >> n;
  cin >> s + 1;
  Hash();
  m = (n + 1) / 2;
  int l, r;
  if (n & 1)
    ans[m] = -1, l = r = m;
  else {
    l = m;
    r = m + 1;
    if (s[l] == s[r])
      ans[m] = 1;
    else
      ans[m] = -1;
  }
  for (int i = m - 1; i >= 1; i--) {
    l--, r++;
    for (int len = ans[i + 1] + 2; len >= -1; len -= 2) {
      if (hs(l, l + len - 1) == hs(r - len + 1, r) || len == -1) {
        ans[i] = len;
        break;
      }
    }
  }
  for (int i = 1; i <= m; i++) {
    cout << ans[i] << " \n"[i == m];
  }
  return 0;
}

```