#include <bits/stdc++.h>
int CH, NEG;
template <typename TP>
inline void read(TP& ret) {
  ret = NEG = 0;
  while (CH = getchar(), CH < '!')
    ;
  if (CH == '-') NEG = true, CH = getchar();
  while (ret = ret * 10 + CH - '0', CH = getchar(), CH > '!')
    ;
  if (NEG) ret = -ret;
}
template <typename TP>
inline void reads(TP* ret) {
  ret[0] = 0;
  while (CH = getchar(), CH < '!')
    ;
  while (ret[++ret[0]] = CH, CH = getchar(), CH > '!')
    ;
  ret[ret[0] + 1] = 0;
}
int p26[1000010LL];
inline int mul(const int& x, const int& y) {
  return 1LL * x * y % 1000000007LL;
}
inline int add(int x, const int& y) {
  x += y;
  return x < 1000000007LL ? x : x - 1000000007LL;
}
inline int minus(const int& x, const int& y) {
  return x < y ? x + 1000000007LL - y : x - y;
}
inline void pre(int max_len) {
  p26[0] = 1;
  for (int i = (1); i <= (max_len); i++) p26[i] = mul(p26[i - 1], 26);
}
int n;
int s[1000010LL];
int p[1000010LL];
int ans[1000010LL];
inline int sub_hash(int begin, int len) {
  return minus(p[begin + len - 1], mul(p[begin - 1], p26[len]));
}
inline void work() {
  int i;
  for (i = (1); i <= (n); i++) p[i] = add(mul(p[i - 1], 26), s[i] - 'a');
  i = (n + 1) / 2;
  if ((n & 1) || (s[i] != s[i + 1]))
    ans[i] = -1;
  else
    ans[i] = 1;
  for (i = ((n + 1) / 2 - 1); i >= (1); i--) {
    ans[i] = ans[i + 1] + 2;
    while (ans[i] > 0 &&
           sub_hash(i, ans[i]) != sub_hash(n - i - ans[i] + 2, ans[i]))
      ans[i] -= 2;
  }
  for (i = (1); i <= ((n + 1) / 2); i++) {
    printf("%d ", ans[i]);
  }
  puts("");
}
int main() {
  read(n);
  reads(s);
  pre(n);
  work();
END:
  getchar(), getchar();
  return 0;
}

### Prompt

Please formulate 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>
int CH, NEG;
template <typename TP>
inline void read(TP& ret) {
  ret = NEG = 0;
  while (CH = getchar(), CH < '!')
    ;
  if (CH == '-') NEG = true, CH = getchar();
  while (ret = ret * 10 + CH - '0', CH = getchar(), CH > '!')
    ;
  if (NEG) ret = -ret;
}
template <typename TP>
inline void reads(TP* ret) {
  ret[0] = 0;
  while (CH = getchar(), CH < '!')
    ;
  while (ret[++ret[0]] = CH, CH = getchar(), CH > '!')
    ;
  ret[ret[0] + 1] = 0;
}
int p26[1000010LL];
inline int mul(const int& x, const int& y) {
  return 1LL * x * y % 1000000007LL;
}
inline int add(int x, const int& y) {
  x += y;
  return x < 1000000007LL ? x : x - 1000000007LL;
}
inline int minus(const int& x, const int& y) {
  return x < y ? x + 1000000007LL - y : x - y;
}
inline void pre(int max_len) {
  p26[0] = 1;
  for (int i = (1); i <= (max_len); i++) p26[i] = mul(p26[i - 1], 26);
}
int n;
int s[1000010LL];
int p[1000010LL];
int ans[1000010LL];
inline int sub_hash(int begin, int len) {
  return minus(p[begin + len - 1], mul(p[begin - 1], p26[len]));
}
inline void work() {
  int i;
  for (i = (1); i <= (n); i++) p[i] = add(mul(p[i - 1], 26), s[i] - 'a');
  i = (n + 1) / 2;
  if ((n & 1) || (s[i] != s[i + 1]))
    ans[i] = -1;
  else
    ans[i] = 1;
  for (i = ((n + 1) / 2 - 1); i >= (1); i--) {
    ans[i] = ans[i + 1] + 2;
    while (ans[i] > 0 &&
           sub_hash(i, ans[i]) != sub_hash(n - i - ans[i] + 2, ans[i]))
      ans[i] -= 2;
  }
  for (i = (1); i <= ((n + 1) / 2); i++) {
    printf("%d ", ans[i]);
  }
  puts("");
}
int main() {
  read(n);
  reads(s);
  pre(n);
  work();
END:
  getchar(), getchar();
  return 0;
}

```