#include <bits/stdc++.h>
using namespace std;
int n, a[200001], p[200001][2];
long long q[200001][2];
long long find(int x, int y) {
  if (x <= 0 || x > n) return 0;
  if (q[x][y]) return q[x][y];
  if (p[x][y]) return q[x][y] = -1;
  p[x][y] = 1;
  long long t = a[x], w = find(x + ((y == 0) ? a[x] : -a[x]), 1 - y);
  t = (w == -1) ? -1 : t + w;
  q[x][y] = t;
  p[x][y] = 0;
  return t;
}
int main() {
  cin >> n;
  for (int i = 2; i <= n; i++) cin >> a[i];
  for (int i = 1; i < n; i++) {
    a[1] = i;
    q[1][0] = q[1][0] = 0;
    long long t = find(1, 0);
    cout << t << endl;
  }
  return 0;
}
