#include <bits/stdc++.h>
using namespace std;
long long f[200003];
int a[200003], n, vis[200003];
bool ans[200003];
bool s3(int x) {
  if (vis[x] == a[1]) return 0;
  if (ans[x]) return f[x] != -1LL;
  vis[x] = a[1];
  ans[x] = 1;
  int X = x;
  f[X] += (long long)(a[x]);
  x -= a[x];
  if (x < 1) return 1;
  f[X] += (long long)(a[x]);
  x += a[x];
  if (x > n) return 1;
  if (!s3(x)) {
    f[X] = -1LL;
    return 0;
  } else {
    f[X] += f[x];
    return 1;
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  int i, j, k, m;
  cin >> n;
  for (i = 2; i <= n; ++i) cin >> a[i];
  for (a[1] = 1; a[1] < n; ++a[1]) {
    if (s3(1 + a[1]))
      cout << ((long long)(a[1]) + f[1 + a[1]]) << endl;
    else
      cout << -1 << endl;
  }
  return 0;
}
