#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
const int iinf = 1 << 29;
const long long llinf = 1ll << 60;
const double PI = 3.14159265;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
long long mrand(long long B) { return (unsigned long long)rng() % B; }
long long cross(pair<long long, long long> p1, pair<long long, long long> p2) {
  return p1.first * p2.second - p2.first * p1.second;
}
bool online(pair<long long, long long> a, pair<long long, long long> b,
            pair<long long, long long> c) {
  pair<long long, long long> p1{b.first - a.first, b.second - a.second};
  pair<long long, long long> p2{c.first - a.first, c.second - a.second};
  return cross(p1, p2) == 0;
}
void z_func(vector<int> &z, vector<int> &s, int n) {
  int L = 0, R = 0;
  for (int i = 1; i < n; i++) {
    if (i > R) {
      L = R = i;
      while (R < n && s[R - L] == s[R]) R++;
      z[i] = R - L;
      R--;
    } else {
      int k = i - L;
      if (z[k] < R - i + 1)
        z[i] = z[k];
      else {
        L = i;
        while (R < n && s[R - L] == s[R]) R++;
        z[i] = R - L;
        R--;
      }
    }
  }
}
void work() {
  int n;
  cin >> n;
  vector<long long> v(n + 1);
  for (int i = 2; i <= n; ++i) cin >> v[i];
  vector<vector<long long>> y(n + 1, vector<long long>(2, -2));
  vector<long long> ans(n + 1);
  vector<vector<long long>> aux(n + 1, vector<long long>(2, -2));
  vector<int> turns(n + 1);
  for (int i = 1; i < n; ++i) {
    v[1] = i;
    y[1][1] = -3;
    vector<int> seen;
    int x = 1 + v[1];
    long long cur_y = v[1];
    int turn = 0;
    while (x > 0 && x <= n) {
      if (y[x][turn] == -3 || y[x][turn] == -1) {
        seen.push_back(x);
        cur_y = -1;
        turn ^= 1;
        break;
      }
      if (y[x][turn] != -2) {
        cur_y += y[x][turn] - aux[x][turn];
        break;
      }
      seen.push_back(x);
      aux[x][turn] = cur_y;
      cur_y += v[x];
      y[x][turn] = -3;
      if (turn == 0)
        x -= v[x];
      else
        x += v[x];
      turn ^= 1;
    }
    turn ^= 1;
    for (int i = ((int)(seen).size()) - 1; i >= 0; --i) {
      y[seen[i]][turn] = cur_y;
      turn ^= 1;
    }
    ans[i] = cur_y;
  }
  for (int i = 1; i < n; ++i) cout << ans[i] << "\n";
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  work();
  return 0;
}
