#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200005;
long long dp[MAXN][2];
int b[MAXN][2], a[MAXN];
int n;
long long dfs(int x, int op, int cur) {
  if (x <= 0 || x > n) {
    return 0;
  }
  if (dp[x][op] != 0) {
    return dp[x][op];
  }
  if (b[x][op] == cur) {
    return -1;
  }
  b[x][op] = cur;
  int delta = op == 0 ? a[x] : -a[x];
  long long ret = dfs(x + delta, 1 - op, cur);
  if (ret == -1) {
    return dp[x][op] = -1;
  }
  return dp[x][op] = ret + a[x];
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; ++i) {
    scanf("%d", a + i);
  }
  for (int i = 1; i < n; ++i) {
    a[1] = i;
    dp[1][0] = 0;
    long long ret = dfs(1, 0, i);
    cout << ret << endl;
  }
  return 0;
}
