#include <bits/stdc++.h>
using namespace std;
int n, a[200010];
long long dp[200010][2];
long long work(int x, int w) {
  if (x <= 0 || x > n) return 0;
  if (dp[x][w] != -2) return dp[x][w];
  dp[x][w] = -1;
  dp[x][w] = work(x + (w == 0 ? a[x] : -a[x]), 1 - w);
  if (dp[x][w] != -1) dp[x][w] += a[x];
  return dp[x][w];
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 0; i <= n; i++) dp[i][0] = dp[i][1] = -2;
  for (int i = 1; i < n; i++) {
    a[1] = i;
    dp[1][0] = -1;
    long long ans = work(i + 1, 1);
    if (ans != -1) ans += i;
    printf("%I64d\n", ans);
  }
  return 0;
}
