#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e9 + 7, second = 1e5 + 1;
long long int n;
long long int dp[200005][2];
vector<long long int> a(200005);
long long int fn(long long int x, long long int f) {
  if (x <= 0 || x > n) {
    return 0;
  }
  if (dp[x][f]) {
    return dp[x][f];
  }
  dp[x][f] = -1;
  long long int s;
  if (f) {
    s = fn(x + a[x], 0);
  } else {
    s = fn(x - a[x], 1);
  }
  if (s == -1) {
    return dp[x][f] = -1;
  }
  return dp[x][f] = s + a[x];
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) {
    cin >> n;
    for (long long int i = 2; i < n + 1; i++) {
      cin >> a[i];
    }
    memset(dp, 0, sizeof(dp));
    for (long long int i = 1; i < n; i++) {
      a[1] = i;
      dp[1][1] = 0;
      long long int ans = fn(1, 1);
      cout << ans << '\n';
    }
  }
  return 0;
}
