#include <bits/stdc++.h>
const long long inf = 0x3f3f3f3f3f3f3f3LL;
const long long mod = (long long)1e9 + 7;
using namespace std;
template <class T>
void smin(T& a, T val) {
  if (a > val) a = val;
}
template <class T>
void smax(T& a, T val) {
  if (a < val) a = val;
}
const long long N = 2 * (long long)1e5 + 10;
long long n, a[N], dp[N][2];
long long solve(long long idx, bool is_neg) {
  if (idx > n or idx <= 0) return 0;
  long long& ans = dp[idx][is_neg];
  if (ans != -1) {
    return ans;
  }
  ans = -1e13;
  if (is_neg) {
    ans = a[idx] + solve(idx - a[idx], !is_neg);
  } else {
    ans = a[idx] + solve(idx + a[idx], !is_neg);
  }
  return ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  memset(dp, -1, sizeof dp);
  for (long long i = 2; i <= n; ++i) {
    cin >> a[i];
  }
  for (long long i = 1; i < n; ++i) {
    a[1] = i;
    long long ans = i + solve(i + 1, 1);
    if (ans < 0) ans = -1;
    cout << ans << '\n';
  }
  return 0;
}
