There are n parrots standing in a circle. Each parrot has a certain level of respect among other parrots, namely r_i. When a parrot with respect level x starts chattering, x neighbours to the right and to the left of it start repeating the same words in 1 second. Their neighbours then start repeating as well, and so on, until all the birds begin to chatter.

You are given the respect levels of all parrots. For each parrot answer a question: if this certain parrot starts chattering, how many seconds will pass until all other birds will start repeating it?

Input

In the first line of input there is a single integer n, the number of parrots (1 ≤ n ≤ 10^5).

In the next line of input there are n integers r_1, ..., r_n, the respect levels of parrots in order they stand in the circle (1 ≤ r_i ≤ n).

Output

Print n integers. i-th of them should equal the number of seconds that is needed for all parrots to start chattering if the i-th parrot is the first to start.

Examples

Input


4
1 1 4 1


Output


2 2 1 2 


Input


8
1 2 2 1 5 1 3 1


Output


3 3 2 2 1 2 2 3 
#include <bits/stdc++.h>
using namespace std;
const int N = 300010;
struct tree {
  int a[N << 2], b[N << 2];
  void init(int lt, int rt, int step, int l[N], int r[N]) {
    if (lt == rt) {
      a[step] = l[lt];
      b[step] = r[lt];
      return;
    }
    int mid = (lt + rt) >> 1;
    init(lt, mid, step << 1, l, r);
    init(mid + 1, rt, step << 1 | 1, l, r);
    a[step] = min(a[step << 1], a[step << 1 | 1]);
    b[step] = max(b[step << 1], b[step << 1 | 1]);
  }
  pair<int, int> query(int l, int r, int L, int R, int step) {
    if (l == L && R == r) {
      assert(a[step] >= 1);
      return make_pair(a[step], b[step]);
    }
    int mid = (l + r) >> 1;
    if (R <= mid) return query(l, mid, L, R, step << 1);
    if (L > mid) return query(mid + 1, r, L, R, step << 1 | 1);
    pair<int, int> lc = query(l, mid, L, mid, step << 1);
    pair<int, int> rc = query(mid + 1, r, mid + 1, R, step << 1 | 1);
    return make_pair(min(lc.first, rc.first), max(lc.second, rc.second));
  }
} T[17];
int a[N], l[N], r[N];
int main() {
  int n;
  scanf("%d", &n);
  if (n == 1) {
    printf("0\n");
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    a[i + n] = a[i + 2 * n] = a[i];
  }
  for (int i = 1; i <= 3 * n; i++) {
    l[i] = max(1, i - a[i]);
    r[i] = min(3 * n, i + a[i]);
  }
  for (int i = 1; i <= 16; i++) {
    T[i - 1].init(1, n * 3, 1, l, r);
    for (int j = 1; j <= 3 * n; j++) {
      pair<int, int> pi = T[i - 1].query(1, 3 * n, l[j], r[j], 1);
      l[j] = pi.first, r[j] = pi.second;
    }
  }
  T[16].init(1, n * 3, 1, l, r);
  for (int i = n + 1; i <= 2 * n; i++) {
    int l = i, r = i;
    int ans = 0;
    for (int j = 16; j >= 0; j--) {
      pair<int, int> pi = T[j].query(1, 3 * n, l, r, 1);
      if (pi.second - pi.first + 1 >= n) continue;
      l = pi.first, r = pi.second;
      ans |= (1 << j);
    }
    printf("%d ", ans + 1);
  }
  printf("\n");
  return 0;
}
