#include <bits/stdc++.h>
using namespace std;
long long Y[200010][2];
char V[200010][2];
long long a[200010];
long long dfs(int, int);
long long N;
int main() {
  for (int i = 0; i < 200010; i++) {
    V[i][0] = 'W';
    V[i][1] = 'W';
  }
  cin >> N;
  for (int j = 2; j <= N; j++) cin >> a[j];
  for (int i = 2; i <= N; i++) {
    if (V[i][0] = 'W') dfs(i, 0);
    if (V[i][1] = 'W') dfs(i, 1);
  }
  for (int i = 1; i < N; i++) {
    a[1] = i;
    V[1][0] = 'W';
    V[1][1] = 'W';
    cout << dfs(1, 1) << endl;
  }
  return 0;
}
long long dfs(int nod, int type) {
  V[nod][type] = 'G';
  long long nextNod;
  if (type) {
    nextNod = nod + a[nod];
  } else {
    nextNod = nod - a[nod];
  }
  long long y = a[nod];
  if (nextNod > N or nextNod <= 0LL) {
  } else {
    int next_node = nextNod;
    if (next_node == 1LL)
      y = -1LL;
    else if (V[next_node][type ^ 1] == 'G') {
      y = -1LL;
    } else if (V[next_node][type ^ 1] == 'W') {
      long long tmp = dfs(next_node, type ^ 1);
      if (tmp == -1LL)
        y = -1LL;
      else
        y += tmp;
    } else {
      if (V[next_node][type ^ 1] == 'B') {
        long long tmp = Y[next_node][type ^ 1];
        if (tmp == -1LL)
          y = -1LL;
        else
          y += tmp;
      }
    }
  }
  V[nod][type] = 'B';
  Y[nod][type] = y;
  return y;
}
