#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 1;
long long n, vis[MAX][2];
long long dp[MAX][2], a[MAX];
vector<long long> v[MAX];
long long DFS(long long i, long long s) {
  long long j, k;
  if (i == 1 && s == 0) return -1;
  if (i > n || i < 1) return 0;
  if (dp[i][s] != -2) return dp[i][s];
  if (vis[i][s] == 1) return -1;
  vis[i][s] = 1;
  if (s == 0) {
    if (a[i] + i > n) {
      dp[i][s] = a[i];
      return dp[i][s];
    }
  } else {
    if (-a[i] + i < 1) {
      dp[i][s] = a[i];
      return dp[i][s];
    }
  }
  j = DFS(v[i][s], 1 - s);
  if (j != -1) {
    dp[i][s] = a[i] + j;
  } else {
    dp[i][s] = -1;
  }
  return dp[i][s];
}
int main() {
  long long i, j, m, k;
  cin >> n;
  for (i = 2; i <= n; i++) {
    dp[i][0] = -2;
    dp[i][1] = -2;
    vis[i][0] = 0;
    vis[i][1] = 0;
    cin >> a[i];
    v[i].push_back(i + a[i]);
    v[i].push_back(i - a[i]);
  }
  dp[1][1] = 0;
  for (i = 2; i <= n; i++) {
    a[1] = i - 1;
    dp[i][1] = DFS(i, 1);
    if (dp[i][1] == -1)
      cout << -1 << '\n';
    else {
      k = a[1] + dp[i][1];
      cout << k << '\n';
    }
  }
}
