#include <bits/stdc++.h>
using namespace std;
int n, a[200002];
long long dp[200002][2];
long long dfs(int root, int flag, int v[][2]) {
  if (root <= 0 || root > n) return 0;
  bool bit;
  flag == 1 ? bit = 1 : bit = 0;
  if (v[root][bit] == 1) return dp[root][bit];
  if (v[root][bit] == 0) return -1;
  v[root][bit] = 0;
  dp[root][bit] = dfs(root + flag * a[root], flag * -1, v);
  if (dp[root][bit] != -1) dp[root][bit] += (long long)a[root];
  v[root][bit] = 1;
  return dp[root][bit];
}
int main() {
  ios_base::sync_with_stdio(false);
  int i, j, temp;
  int v[200002][2];
  long long ans;
  memset(v, -1, sizeof(v));
  cin >> n;
  for (i = 2; i < n + 1; i++) cin >> a[i];
  for (i = 1; i < n; i++) {
    a[1] = i;
    v[1][0] = v[1][1] = -1;
    ans = dfs(1, 1, v);
    cout << ans << "\n";
  }
  return 0;
}
