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