#include <bits/stdc++.h>
using namespace std;
const long long M = 200200;
long long n, a[M], b[M][2], c[M][2], d;
long long go(long long i, long long j) {
  if (i < 1 || i > n) return 0;
  long long &r = b[i][j], &s = c[i][j];
  if (1 == i || s == d)
    r = -1;
  else if (!s) {
    s = d;
    long long t = go(i + (j ? -a[i] : a[i]), !j);
    r = t < 0 ? -1 : t + a[i];
  }
  return r;
}
int main() {
  cin >> n;
  for (long long i = 2; i <= n; ++i) cin >> a[i];
  for (long long i = 1, t; i < n; ++i)
    ++d, cout << ((t = go(i + 1, 1)) < 0 ? -1 : t + i) << endl;
  return 0;
}
