#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
long long dp[200005][2];
int a[200005];
int vis[200005][2];
int n;
long long DP(int first, int t) {
  if (first == 1) return -1;
  if (first <= 0 || first > n) return 0;
  if (dp[first][t] != -2) return dp[first][t];
  if (vis[first][t]) return -1;
  vis[first][t] = 1;
  if (t == 0) {
    long long xx = DP(first + a[first], 1);
    if (xx == -1)
      dp[first][t] = -1;
    else
      dp[first][t] = xx + a[first];
  } else {
    long long xx = DP(first - a[first], 0);
    if (xx == -1)
      dp[first][t] = -1;
    else
      dp[first][t] = xx + a[first];
  }
  vis[first][t] = 0;
  return dp[first][t];
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) {
    dp[i][0] = dp[i][1] = -2;
  }
  for (int i = 2; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n - 1; i++) {
    long long ans = DP(1 + i, 1);
    if (ans == -1)
      printf("-1\n");
    else
      printf("%lld\n", ans + i);
  }
}
