#include <bits/stdc++.h>
using namespace std;
const long long int INF = 98769876987698889LL;
const int MOD = 1e9 + 7;
const int dx8[] = {1, 1, 0, -1, -1, -1, 0, 1};
const int dy8[] = {0, 1, 1, 1, 0, -1, -1, -1};
const int dx4[] = {0, 0, 1, -1};
const int dy4[] = {1, -1, 0, 0};
const int N = 2e5 + 6;
long long int a[N], vis[N][2];
int n;
long long int dfs(int x, int d) {
  if (x <= 0 or x > n) return 0;
  if (vis[x][d] != 0) {
    return vis[x][d];
  }
  vis[x][d] = -1;
  if (d == 0) {
    long long int check = dfs(x + a[x], 1);
    if (check != -1) {
      vis[x][d] = check + a[x];
    } else
      vis[x][d] = check;
  } else {
    long long int check = dfs(x - a[x], 0);
    if (check != -1) {
      vis[x][d] = check + a[x];
    } else
      vis[x][d] = check;
  }
  return vis[x][d];
}
int main() {
  cin >> n;
  for (int i = 2; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n - 1; i++) {
    vis[1][0] = 0;
    a[1] = i;
    cout << dfs(1, 0) << endl;
  }
}
