#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
char s[maxn];
template <unsigned mod, unsigned base>
struct Hash {
  unsigned p[maxn], pre[maxn];
  Hash() {
    p[0] = 1;
    for (int i = 1; i < maxn; i++) p[i] = 1ull * p[i - 1] * base % mod;
    pre[0] = 0;
  }
  void build(const char *s) {
    int len = strlen(s);
    for (int i = 0; i < len; i++)
      pre[i + 1] = (1ull * pre[i] * base + s[i]) % mod;
  }
  unsigned operator()(int l, int r) {
    return (pre[r] - 1ull * pre[l] * p[r - l] % mod + mod) % mod;
  }
};
struct d_hash {
  Hash<997137961, 753> h1;
  Hash<1003911991, 467> h2;
  void build(const char *s) {
    h1.build(s);
    h2.build(s);
  }
  uint64_t operator()(int l, int r) {
    return uint64_t(h1(l, r)) << 32 | h2(l, r);
  }
} hasher;
int main() {
  std::ios::sync_with_stdio(false), cin.tie(0);
  int n;
  cin >> n;
  cin >> s;
  int up = (n + 1) / 2;
  vector<int> ans(up + 1, -1);
  hasher.build(s);
  auto ok = [&](int l1, int r1, int l2, int r2) {
    return hasher(l1 - 1, r1) == hasher(l2 - 1, r2);
  };
  for (int i = up; i >= 1; i--) {
    if (i == up) {
      if (n % 2 == 1)
        ans[i] = -1;
      else {
        if (s[i - 1] == s[i])
          ans[i] = 1;
        else
          ans[i] = -1;
      }
    } else {
      ans[i] = ans[i + 1] + 2;
      while (ans[i] > 0 &&
             !ok(i, i + ans[i] - 1, n - i + 1 - ans[i] + 1, n - i + 1)) {
        ans[i] -= 2;
      }
    }
  }
  for (int i = 1; i <= up; i++) cout << ans[i] << " \n"[i == up];
  return 0;
}

### Prompt

Your task is to create a Cpp solution to the following problem:

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 = 1e6 + 10;
char s[maxn];
template <unsigned mod, unsigned base>
struct Hash {
  unsigned p[maxn], pre[maxn];
  Hash() {
    p[0] = 1;
    for (int i = 1; i < maxn; i++) p[i] = 1ull * p[i - 1] * base % mod;
    pre[0] = 0;
  }
  void build(const char *s) {
    int len = strlen(s);
    for (int i = 0; i < len; i++)
      pre[i + 1] = (1ull * pre[i] * base + s[i]) % mod;
  }
  unsigned operator()(int l, int r) {
    return (pre[r] - 1ull * pre[l] * p[r - l] % mod + mod) % mod;
  }
};
struct d_hash {
  Hash<997137961, 753> h1;
  Hash<1003911991, 467> h2;
  void build(const char *s) {
    h1.build(s);
    h2.build(s);
  }
  uint64_t operator()(int l, int r) {
    return uint64_t(h1(l, r)) << 32 | h2(l, r);
  }
} hasher;
int main() {
  std::ios::sync_with_stdio(false), cin.tie(0);
  int n;
  cin >> n;
  cin >> s;
  int up = (n + 1) / 2;
  vector<int> ans(up + 1, -1);
  hasher.build(s);
  auto ok = [&](int l1, int r1, int l2, int r2) {
    return hasher(l1 - 1, r1) == hasher(l2 - 1, r2);
  };
  for (int i = up; i >= 1; i--) {
    if (i == up) {
      if (n % 2 == 1)
        ans[i] = -1;
      else {
        if (s[i - 1] == s[i])
          ans[i] = 1;
        else
          ans[i] = -1;
      }
    } else {
      ans[i] = ans[i + 1] + 2;
      while (ans[i] > 0 &&
             !ok(i, i + ans[i] - 1, n - i + 1 - ans[i] + 1, n - i + 1)) {
        ans[i] -= 2;
      }
    }
  }
  for (int i = 1; i <= up; i++) cout << ans[i] << " \n"[i == up];
  return 0;
}

```