#include <bits/stdc++.h>
using namespace std;
int n;
int v[(int)10e5 + 10];
long long dp[(int)10e5 + 10][2];
int vis[(int)10e5 + 10][2];
long long dfs(int curr, int turn, long long y) {
  if (curr <= 0 || curr > n) return 0;
  long long &ret = dp[curr][turn];
  if (ret != -1) return ret;
  if (!vis[curr][turn] && !turn) {
    vis[curr][turn] = 1;
    long long tmp = dfs(curr + v[curr], !turn, y + v[curr]);
    if (tmp != -1)
      ret = v[curr] + tmp;
    else
      ret = -1;
  } else if (!vis[curr][turn]) {
    vis[curr][turn] = 1;
    long long tmp = dfs(curr - v[curr], !turn, y + v[curr]);
    if (tmp != -1)
      ret = v[curr] + tmp;
    else
      ret = -1;
  } else
    return -1;
  return ret;
}
int main(int argc, char *argv[]) {
  scanf("%d", &n);
  int x;
  memset(dp, -1, sizeof dp);
  memset(vis, 0, sizeof vis);
  for (int i = 2; i <= n + 1; ++i) {
    scanf("%d", &x);
    v[i] = x;
  }
  for (int i = 1; i < n; ++i) {
    v[1] = i;
    cout << dfs(1, 0, 0) << endl << endl;
    vis[1][0] = 0;
    dp[1][0] = -1;
  }
  return 0;
}
