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