#include <bits/stdc++.h>
using namespace std;
const int NMAX = 200005;
int a[NMAX];
long long sp[NMAX];
int n;
long long dfs(int x) {
  int sx = x, y = 0;
  if (x != 1 && sp[x] != -1) return sp[x];
  sp[x] = -2;
  y += a[x];
  x += a[x];
  if (x < 1 || x > n) return sp[sx] = y;
  if (x == 1 || x == sx) return sp[sx] = -2;
  y += a[x];
  x -= a[x];
  if (x < 1 || x > n) return sp[sx] = y;
  if (x == 1 || x == sx) return sp[sx] = -2;
  long long tmp = dfs(x);
  if (tmp == -2)
    return sp[sx] = -2;
  else
    return sp[sx] = tmp + y;
}
int main() {
  long long tmp;
  scanf("%d", &n);
  memset(sp, -1, sizeof sp);
  for (int i = 2; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n - 1; i++) {
    a[1] = i;
    tmp = dfs(1);
    if (tmp == -2)
      printf("-1\n");
    else
      cout << tmp << endl;
  }
  return 0;
}
