#include <bits/stdc++.h>
using namespace std;
long long n, a[200005], ans[200005];
map<long long, long long> mp;
long long dpdfs(long long x) {
  long long xc = x;
  if (x < 0 || x >= n - 1) return 0;
  if (mp[x] > 1) return -1;
  mp[x]++;
  if (ans[x] != -5) return ans[x];
  long long y = a[x];
  if (x - a[x] == -1) return -1;
  if (x - a[x] < 0) return y;
  x -= a[x];
  y += a[x];
  x += a[x];
  long long zz = dpdfs(x);
  if (zz == -1) {
    ans[xc] = -1;
    return -1;
  }
  return ans[xc] = y + zz;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (long long i = 0; i < n - 1; i++) cin >> a[i];
  for (long long i = 0; i < 200005; i++) ans[i] = -5;
  for (long long i = 0; i < n - 1; i++)
    if (ans[i] == -5) {
      mp.clear();
      ans[i] = dpdfs(i);
    }
  for (long long i = 0; i < n - 1; i++) {
    if (ans[i] == -1)
      cout << -1 << endl;
    else
      cout << ans[i] + i + 1 << endl;
  }
}
