#include <bits/stdc++.h>
using namespace std;
long long int n, val;
vector<vector<pair<long long int, long long int> > > x(2);
vector<long long int> y;
void compute(long long int idx, long long int r) {
  if (x[r][idx].first > n || x[r][idx].first <= 0) {
    x[r][idx].second = y[idx];
    return;
  }
  x[r][idx].second = -1;
  long long int nxt = x[r][idx].first;
  if (x[1 - r][nxt].second == -2) compute(nxt, 1 - r);
  if (x[1 - r][nxt].second == -1)
    x[r][idx].second = -1;
  else
    x[r][idx].second = x[1 - r][nxt].second + y[idx];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  vector<long long int> v;
  for (long long int i = 2; i <= n; i++) {
    cin >> val;
    v.push_back(val);
  }
  x[0].push_back({0, 0});
  x[0].push_back({0, -1});
  x[1].push_back({0, 0});
  x[1].push_back({0, -1});
  y.push_back(0);
  y.push_back(0);
  for (long long int i = 0; i < v.size(); i++) {
    x[0].push_back({i + 2 + v[i], -2});
    x[1].push_back({i + 2 - v[i], -2});
    y.push_back(v[i]);
  }
  for (long long int i = 0; i < 2; i++) {
    for (long long int j = 2; j <= n; j++) {
      if (x[i][j].second == -2) compute(j, i);
    }
  }
  for (long long int i = 1; i <= n - 1; i++) {
    if (x[1][1 + i].second == -1)
      cout << -1 << "\n";
    else
      cout << x[1][1 + i].second + i << "\n";
  }
}
