#include <bits/stdc++.h>
using namespace std;
int a[211111], v[211111][2], n;
long long f[211111][2];
long long dfs(int x, int k) {
  long long y;
  if (x < 1 || x > n) return 0;
  if (v[x][k] == a[1] || v[x][k] == -1) return -1;
  if (v[x][k]) return f[x][k];
  v[x][k] = a[1];
  if (k)
    y = dfs(x - a[x], 1 - k);
  else
    y = dfs(x + a[x], 1 + k);
  if (y == -1)
    return v[x][k] = -1;
  else
    return f[x][k] = y + a[x];
}
int main() {
  int i;
  cin >> n;
  for (i = 2; i <= n; i++) cin >> a[i];
  for (i = 1; i < n; i++) {
    a[1] = i;
    v[1][0] = 0;
    long long ans = dfs(1, 0);
    printf("%I64d\n", ans);
  }
}
