#include <bits/stdc++.h>
using namespace std;
int n;
int a[210000];
long long dp[210000][2];
void init() {
  for (int i = 0; i < 210000; i++) dp[i][0] = dp[i][1] = -2;
}
long long solve(int x, bool t) {
  if (x < 1 || x > n) return 0;
  if (dp[x][t] != -2) return dp[x][t];
  dp[x][t] = -1;
  int xt = x;
  if (t)
    xt += a[x];
  else
    xt -= a[x];
  long long tmp = solve(xt, !t);
  if (tmp == -1) return dp[x][t] = -1;
  return dp[x][t] = tmp + a[x];
}
int main() {
  cin >> n;
  for (int i = 2; i <= n; i++) cin >> a[i];
  init();
  for (int i = 1; i < n; i++) {
    long long ret = solve(1 + i, 0);
    if (~ret) ret += i;
    cout << ret << endl;
  }
  return 0;
}
