#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
using ll = long long;
const char E = '\n';
const int N = 200005;
const ll mod = 1e9 + 7;
int n;
ll dp[2][N], a[N];
bool sused[2][N], used[2][N];
vector<pair<int, int> > dif;
void rec(int i, int j) {
  if (sused[j][i]) {
    dp[j][i] = -1;
    return;
  }
  if (used[j][i]) return;
  dif.push_back({i, j});
  sused[j][i] = 1, used[j][i] = 1;
  if (j) {
    dp[j][i] += a[i];
    if (i + a[i] > n) {
      return;
    }
    rec(i + a[i], (j ^ 1));
    dp[j][i] += dp[j ^ 1][i + a[i]];
    if (dp[j ^ 1][i + a[i]] == -1) dp[j][i] = -1;
    return;
  }
  if (i == 1) {
    dp[j][i] = 1e15;
    return;
  }
  dp[j][i] += a[i];
  if (i - a[i] <= 0) return;
  rec(i - a[i], (j ^ 1));
  dp[j][i] += dp[j ^ 1][i - a[i]];
  if (dp[j ^ 1][i - a[i]] == -1) dp[j][i] = -1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 2; i <= n; i++) {
    cin >> a[i];
  }
  sused[1][1] = 1;
  for (int j = 0; j <= 1; j++) {
    for (int i = 2; i <= n; i++) {
      if (!used[j][i]) {
        dif.resize(0);
        rec(i, j);
        if (dp[j][i] > 1e15) dp[j][i] -= 1e15;
        for (auto k : dif) {
          sused[k.second][k.first] = 0;
        }
      }
    }
  }
  for (int i = 1; i < n; i++) {
    if (dp[0][i + 1] == -1)
      cout << -1 << E;
    else
      cout << i + dp[0][i + 1] << E;
  }
  return 0;
}
