#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const int N = 200000;
int n;
int num[200050];
long long dp[400050];
long long dfs(int i, int mode) {
  if (i <= 0 || i > n) return 0;
  if (dp[i + (mode - 1) * N] != -1) {
    return dp[i + (mode - 1) * N];
  }
  dp[i + (mode - 1) * N] = -INF;
  if (mode == 1) {
    long long res1 = dfs(i + num[i], 2);
    return dp[i + (mode - 1) * N] = (res1 != -INF ? num[i] + res1 : -INF);
  } else {
    long long res2 = dfs(i - num[i], 1);
    return dp[i + (mode - 1) * N] = (res2 != -INF ? num[i] + res2 : -INF);
  }
}
int main() {
  fill(dp, dp + 400050, -1);
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) {
    scanf("%d", &num[i]);
  }
  for (int i = 1; i <= n - 1; i++) {
    num[1] = i, dp[1] = -1;
    long long ans = dfs(1, 1);
    cout << (ans == -INF ? -1 : ans) << endl;
  }
}
