#include <bits/stdc++.h>
using namespace std;
long long int po(long long int x, long long int n) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return po((x * x) % 1000000007, n / 2);
  else
    return (x * po((x * x) % 1000000007, (n - 1) / 2)) % 1000000007;
}
long long int GCD(long long int A, long long int B) {
  if (B == 0)
    return A;
  else
    return GCD(B, A % B);
}
long long int dp[200001][2];
long long int a[200001];
long long int v[200001][2];
long long int fill(int s, int of, long long int n) {
  if (s == 1 && of == 0) return -1;
  if (s <= 1 || s > n) return 0;
  if (dp[s][of] != -2) return dp[s][of];
  if (v[s][of] == 1 && dp[s][of] == -2) {
    dp[s][of] = -1;
    return -1;
  }
  v[s][of] = 1;
  long long int y = a[s];
  long long int d;
  if (of == 0)
    d = fill(s + a[s], !of, n);
  else
    d = fill(s - a[s], !of, n);
  if (d != -1)
    y += d;
  else
    y = -1;
  dp[s][of] = y;
  return y;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long int n;
  cin >> n;
  for (int i = 2; i <= n; ++i) cin >> a[i];
  for (int i = 0; i <= n; ++i) v[i][0] = v[i][1] = 0;
  for (int i = 0; i <= n; ++i) dp[i][0] = dp[i][1] = -2;
  for (int i = 2; i <= n; ++i) fill(i, 1, n);
  for (int i = 1; i <= n - 1; ++i) {
    if (dp[i + 1][1] == -1)
      cout << -1 << "\n";
    else
      cout << dp[i + 1][1] + i << "\n";
  }
}
