#include <bits/stdc++.h>
using namespace std;
int n, a[200100];
long long f[200100], g[200100];
bool vf[200100], vg[200100];
long long dfs(int x, long long y, int cur) {
  int dx;
  if (cur) {
    vf[x] = true;
    dx = x + a[x];
    if (dx > n)
      f[x] = a[x];
    else {
      if (vg[dx] && g[dx]) f[x] = a[x] + g[dx];
      if (!vg[dx] && dfs(dx, y + a[x], 0)) f[x] = a[x] + g[dx];
    }
    if (!f[x])
      return 0;
    else
      return f[x] + y;
  } else {
    vg[x] = true;
    dx = x - a[x];
    if (dx <= 0)
      g[x] = a[x];
    else {
      if (vf[dx] && f[dx]) g[x] = a[x] + f[dx];
      if (!vf[dx] && dfs(dx, y + a[x], 1)) g[x] = a[x] + f[dx];
    }
    if (!g[x])
      return 0;
    else
      return g[x] + y;
  }
}
int main() {
  cin >> n;
  int i;
  a[1] = 1;
  for (i = 2; i <= n; i++) scanf("%d", &a[i]);
  memset(f, 0, sizeof(f));
  memset(g, 0, sizeof(g));
  memset(vf, false, sizeof(vf));
  memset(vg, false, sizeof(vg));
  for (i = 1; i < n; i++) {
    a[1] = i;
    f[1] = 0;
    dfs(1, 0, 1);
    if (!f[1])
      cout << -1 << endl;
    else
      cout << f[1] << endl;
  }
}
