#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)2e5 + 5;
const int WHITE = 0;
const int GRAY = 1;
const int BLACK = 2;
int edge[MAXN][2];
int a[MAXN];
int color[MAXN][2];
pair<int, int> p[MAXN][2];
int cycle[MAXN][2];
long long int dp[MAXN][2];
int used[MAXN][2];
int n;
void mark(pair<int, int> node, pair<int, int> viz) {
  if (node.first == -1) {
    return;
  }
  cycle[node.first][node.second] = 1;
  if (node == viz) {
    return;
  }
  int aux = p[node.first][node.second].second;
  node.first = p[node.first][node.second].first;
  node.second = aux;
  mark(node, viz);
  return;
}
void DFS(pair<int, int> node, pair<int, int> par = make_pair(-1, -1)) {
  color[node.first][node.second] = GRAY;
  p[node.first][node.second] = par;
  pair<int, int> viz;
  viz.first = edge[node.first][node.second];
  viz.second = 1 - node.second;
  if (viz.first > 0 && viz.first <= n) {
    if (color[viz.first][viz.second] == WHITE) {
      DFS(viz, node);
    } else if (color[viz.first][viz.second] == GRAY || viz.first == 1) {
      mark(node, viz);
    }
    if (cycle[viz.first][viz.second]) {
      cycle[node.first][node.second] = 1;
    }
  }
  color[node.first][node.second] = BLACK;
  return;
}
long long int solve(pair<int, int> node) {
  if (node.first <= 0 || node.first > n) {
    return 0;
  }
  if (used[node.first][node.second]) {
    return dp[node.first][node.second];
  }
  pair<int, int> viz;
  viz.first = edge[node.first][node.second];
  viz.second = 1 - node.second;
  long long int aux = a[node.first] + solve(viz);
  dp[node.first][node.second] = aux;
  used[node.first][node.second] = 1;
  return aux;
}
int main(void) {
  scanf(" %d", &n);
  a[1] = 1;
  for (int i = 2; i <= n; i++) {
    scanf(" %d", &a[i]);
    edge[i][0] = min(n + 1, i + a[i]);
    edge[i][1] = max(0, i - a[i]);
    for (int j = 0; j < 2; j++) {
      color[i][j] = WHITE;
    }
  }
  color[1][0] = color[1][1] = BLACK;
  for (int i = 2; i <= n; i++) {
    for (int j = 0; j < 2; j++) {
      if (color[i][j] == WHITE) {
        DFS(make_pair(i, j));
      }
    }
  }
  for (int i = 1; i < n; i++) {
    if (cycle[1 + i][1]) {
      printf("-1\n");
    } else {
      printf("%lld\n", i + solve(make_pair(1 + i, 1)));
    }
  }
  return 0;
}
