#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 50;
long long n, a[N], dp[N][2];
long long solve(long long x, int v) {
  if (x <= 0 || x > n) return 0;
  if (dp[x][v]) return dp[x][v];
  dp[x][v] = -1;
  long long z = solve(x + (v ? a[x] : -a[x]), v ^ 1);
  return dp[x][v] = (z != -1 ? z + a[x] : z);
}
int main() {
  cin >> n;
  for (int i = 2; i <= n; i++) cin >> a[i];
  for (int i = 1; i < n; i++) {
    a[1] = i;
    dp[1][1] = dp[1][0] = 0;
    cout << solve(1, 1) << '\n';
  }
}
