#include <bits/stdc++.h>
using namespace std;
long long g[222222][2];
int f[222222], p[222222][2], n, i;
long long dfs(int x, int k, int z) {
  if (x < 1 || x > n) return 0;
  if (g[x][z] == -1 || p[x][z] == k) return -1;
  if (p[x][z]) return g[x][z];
  long long ans = 0;
  p[x][z] = k;
  if (z)
    ans = dfs(x + f[x], k, z ^ 1);
  else
    ans = dfs(x - f[x], k, z ^ 1);
  if (ans == -1)
    return g[x][z] = -1;
  else
    return g[x][z] = ans + f[x];
}
int main() {
  scanf("%d", &n);
  for (i = 2; i <= n; i++) scanf("%d", f + i);
  for (i = 1; i < n; i++) {
    f[1] = i;
    p[1][1] = 0;
    g[1][1] = 0;
    printf("%I64d\n", dfs(1, i, 1));
  }
  return 0;
}
