#include <bits/stdc++.h>
using namespace std;
long long arr[200001];
long long dp[2][200001];
long long n;
long long dfs(long long i, long long di) {
  if (i <= 0 || i > n) return 0;
  if (dp[di][i] != 0) return dp[di][i];
  dp[di][i] = -1;
  long long res;
  if (di) {
    res = dfs(i + arr[i], 1 - di);
  } else {
    res = dfs(i - arr[i], 1 - di);
  }
  if (res < 0)
    return -1;
  else
    return dp[di][i] = res + arr[i];
}
signed main() {
  cin >> n;
  for (long long i = 2; i <= n; i++) {
    cin >> arr[i];
  }
  for (long long i = 1; i < n; i++) {
    dp[1][1] = 0;
    arr[1] = i;
    cout << dfs(1, 1) << endl;
  }
}
