#include <bits/stdc++.h>
using namespace std;
namespace _GuYueNa {
static const int GYN = 2333333;
char SZB[GYN], *S = SZB, *T = SZB;
inline char gc() {
  if (S == T) {
    T = (S = SZB) + fread(SZB, 1, GYN, stdin);
    if (S == T) return '\n';
  }
  return *S++;
}
inline long long read() {
  long long x = 0, g = 1;
  char ch = gc();
  for (; !isdigit(ch); ch = gc())
    if (ch == '-') g = -1;
  for (; isdigit(ch); ch = gc()) x = x * 10 - 48 + ch;
  return x * g;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
inline char readchar() {
  char ch = gc();
  for (; isspace(ch); ch = gc())
    ;
  return ch;
}
inline long long readstr(char *s) {
  char ch = gc();
  int cur = 0;
  for (; isspace(ch); ch = gc())
    ;
  for (; !isspace(ch); ch = gc()) s[cur++] = ch;
  s[cur] = '\0';
  return cur;
}
void Print(long long *a, int s, int t) {
  for (long long i = (s); i <= int(t); ++i) printf("%lld ", a[i]);
}
void Print(int *a, int s, int t) {
  for (long long i = (s); i <= int(t); ++i) printf("%d ", a[i]);
}
void Print(char *a, int s, int t) {
  for (long long i = (s); i <= int(t); ++i) putchar(a[i]);
}
void writeln(long long x) {
  write(x);
  puts("");
}
}  // namespace _GuYueNa
using namespace _GuYueNa;
const long long mod = 1e9 + 7, N = 4000010, lzh = 233;
char s[N];
long long bin[N], hsh[N], ans[N], n, l, r, len;
void Init() {
  bin[0] = 1;
  for (long long i = (1); i <= int(n); ++i) bin[i] = bin[i - 1] * lzh % mod;
  for (long long i = (1); i <= int(n); ++i)
    hsh[i] = (hsh[i - 1] * lzh + s[i]) % mod;
}
inline long long Query(long long l, long long r) {
  return (hsh[r] - hsh[l - 1] * bin[r - l + 1] % mod + mod) % mod;
}
int main() {
  read();
  n = readstr(s + 1);
  Init();
  if (n & 1)
    l = r = n / 2 + 1;
  else
    l = n / 2, r = n / 2 + 1;
  len = 1;
  for (; r <= n; len += 2) {
    for (; len != -1 && Query(l, l + len - 1) != Query(r - len + 1, r) ||
           len >= r - l + 1;)
      len -= 2;
    ans[++ans[0]] = len;
    --l, ++r;
  }
  for (long long i = (ans[0]); i >= int(1); --i) write(ans[i]), putchar(' ');
}

### Prompt

In Cpp, your task is to solve 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;
namespace _GuYueNa {
static const int GYN = 2333333;
char SZB[GYN], *S = SZB, *T = SZB;
inline char gc() {
  if (S == T) {
    T = (S = SZB) + fread(SZB, 1, GYN, stdin);
    if (S == T) return '\n';
  }
  return *S++;
}
inline long long read() {
  long long x = 0, g = 1;
  char ch = gc();
  for (; !isdigit(ch); ch = gc())
    if (ch == '-') g = -1;
  for (; isdigit(ch); ch = gc()) x = x * 10 - 48 + ch;
  return x * g;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
inline char readchar() {
  char ch = gc();
  for (; isspace(ch); ch = gc())
    ;
  return ch;
}
inline long long readstr(char *s) {
  char ch = gc();
  int cur = 0;
  for (; isspace(ch); ch = gc())
    ;
  for (; !isspace(ch); ch = gc()) s[cur++] = ch;
  s[cur] = '\0';
  return cur;
}
void Print(long long *a, int s, int t) {
  for (long long i = (s); i <= int(t); ++i) printf("%lld ", a[i]);
}
void Print(int *a, int s, int t) {
  for (long long i = (s); i <= int(t); ++i) printf("%d ", a[i]);
}
void Print(char *a, int s, int t) {
  for (long long i = (s); i <= int(t); ++i) putchar(a[i]);
}
void writeln(long long x) {
  write(x);
  puts("");
}
}  // namespace _GuYueNa
using namespace _GuYueNa;
const long long mod = 1e9 + 7, N = 4000010, lzh = 233;
char s[N];
long long bin[N], hsh[N], ans[N], n, l, r, len;
void Init() {
  bin[0] = 1;
  for (long long i = (1); i <= int(n); ++i) bin[i] = bin[i - 1] * lzh % mod;
  for (long long i = (1); i <= int(n); ++i)
    hsh[i] = (hsh[i - 1] * lzh + s[i]) % mod;
}
inline long long Query(long long l, long long r) {
  return (hsh[r] - hsh[l - 1] * bin[r - l + 1] % mod + mod) % mod;
}
int main() {
  read();
  n = readstr(s + 1);
  Init();
  if (n & 1)
    l = r = n / 2 + 1;
  else
    l = n / 2, r = n / 2 + 1;
  len = 1;
  for (; r <= n; len += 2) {
    for (; len != -1 && Query(l, l + len - 1) != Query(r - len + 1, r) ||
           len >= r - l + 1;)
      len -= 2;
    ans[++ans[0]] = len;
    --l, ++r;
  }
  for (long long i = (ans[0]); i >= int(1); --i) write(ans[i]), putchar(' ');
}

```