#include <bits/stdc++.h>
using namespace std;
int a[200005];
int d[200005][2];
long long dp[200005][2];
int n;
long long DFS(int x, long long y, int flag, int cnt) {
  long long x1, y1;
  if (d[x][flag] != -1) {
    if (d[x][flag] == cnt)
      return 1;
    else if (dp[x][flag] == 1)
      return 1;
    else {
      return y - dp[x][flag];
    }
  }
  d[x][flag] = cnt;
  if (flag == 0) {
    y1 = y + a[x];
    x1 = x + a[x];
    if (x1 > n || x1 <= 0) {
      dp[x][flag] = -a[x];
      return y + a[x];
    } else if (x1 == 1) {
      dp[x][flag] = 1;
      return 1;
    }
    long long tmp = DFS(x1, y1, !flag, cnt);
    if (tmp == 1)
      dp[x][flag] = 1;
    else
      dp[x][flag] = y - tmp;
    return tmp;
  } else {
    y1 = y + a[x];
    x1 = x - a[x];
    if (x1 > n || x1 <= 0) {
      dp[x][flag] = -a[x];
      return y + a[x];
    } else if (x1 == 1) {
      dp[x][flag] = 1;
      return 1;
    }
    long long tmp = DFS(x1, y1, !flag, cnt);
    if (tmp == 1)
      dp[x][flag] = 1;
    else
      dp[x][flag] = y - tmp;
    return tmp;
  }
}
int main() {
  int i, j, cnt, x;
  scanf("%d", &n);
  for (i = 2; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  cnt = 1;
  memset(d, -1, sizeof(d));
  for (i = 2; i <= n; i++) {
    DFS(i, 0, 0, cnt);
    cnt++;
    DFS(i, 0, 1, cnt);
    cnt++;
  }
  for (i = 1; i < n; i++) {
    x = i + 1;
    if (x > n || x <= 0)
      printf("%d\n", a[i]);
    else if (dp[x][1] == 1)
      printf("-1\n");
    else
      cout << i - dp[x][1] << endl;
  }
  return 0;
}
