#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 7;
long long n, a[maxn], m[maxn][3], d[maxn][3], ans[maxn][3];
void dfs(long long u, long long t) {
  m[u][t] = 1;
  if (t) {
    if (a[u] + u <= n) {
      if (!m[a[u] + u][0]) {
        dfs(a[u] + u, 0);
      } else if (!d[u + a[u]][0]) {
        ans[u][t] = -1, ans[u + a[u]][0] = -1;
      }
      if (d[a[u] + u][0] && ans[a[u] + u][0] != -1) {
        ans[u][t] = a[u] + ans[a[u] + u][0];
      } else {
        ans[u][t] = -1;
      }
    } else {
      ans[u][t] = a[u];
    }
  } else {
    if (u - a[u] > 0) {
      if (!m[u - a[u]][1]) {
        dfs(u - a[u], 1);
      } else if (!d[u - a[u]][1]) {
        ans[u][t] = -1, ans[u - a[u]][1] = -1;
      }
      if (d[u - a[u]][1] && ans[u - a[u]][1] != -1) {
        ans[u][t] = a[u] + ans[u - a[u]][1];
      } else {
        ans[u][t] = -1;
      }
    } else {
      ans[u][t] = a[u];
    }
  }
  d[u][t] = 1;
}
void solve() {
  cin >> n;
  for (long long i = 2; i <= n; ++i) {
    cin >> a[i];
  }
  for (long long i = 1; i < n; ++i) {
    a[1] = i, d[1][1] = 0;
    dfs(1, 1);
    cout << ans[1][1] << endl;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
