#include <bits/stdc++.h>
using namespace std;
const int MOD(1000000007);
const int INF((1 << 30) - 1);
const int MAXN(200050);
int n, a[MAXN];
bool visited[MAXN][2];
long long b[MAXN][2];
long long DFS(int x, long long y, int c) {
  if (x <= 0 || x > n) return y;
  if (x == 1) return -1;
  if (visited[x][c]) {
    if (b[x][c] == -1)
      return -1;
    else
      return y + b[x][c];
  }
  visited[x][c] = 1;
  if (c) {
    long long num = DFS(x + a[x], y + a[x], !c);
    if (num == -1)
      b[x][c] = -1;
    else
      b[x][c] = num - y;
    return num;
  } else {
    long long num = DFS(x - a[x], y + a[x], !c);
    if (num == -1)
      b[x][c] = -1;
    else
      b[x][c] = num - y;
    return num;
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 2; i <= n; i++) b[i][0] = b[i][1] = -1;
  for (int i = 2; i <= n; i++)
    if (!visited[i][0]) DFS(i, 0, 0);
  for (int i = 2; i <= n; i++)
    if (b[i][0] == -1)
      printf("-1\n");
    else
      printf("%I64d\n", b[i][0] + (i - 1));
}
