#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 2e5 + 5;
const int OO = 1e9;
const double PI = acos(-1);
const double EPS = 1e-8;
long long fastpow(long long b, long long e) {
  if (!e) return 1;
  long long ret = fastpow(b, e / 2);
  ret = (ret * ret) % mod;
  if (e % 2) ret = (ret * b) % mod;
  return ret;
}
long long mi(int x) { return fastpow(x, mod - 2); }
int n, a[N];
long long dp[N][3];
int vis[N][3];
long long solve(int x, bool ch) {
  if (x <= 0 || x > n) return 0;
  if (dp[x][ch] != -1) return dp[x][ch];
  if (vis[x][ch]) return -2;
  vis[x][ch] = 1;
  long long ret = solve(x + (ch ? a[x] : -a[x]), !ch);
  if (ret == -2) return -2;
  return dp[x][ch] = ret + a[x];
}
int main() {
  memset(dp, -1, sizeof dp);
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i < n; i++) {
    long long res = solve(i + 1, 0);
    printf("%lld\n", res == -2 ? -1 : res + i);
  }
  return 0;
}
