#include <bits/stdc++.h>
using namespace std;
template <class T, class U>
void maximize(T &x, U y) {
  if (x < y) x = y;
}
template <class T, class U>
void minimize(T &x, U y) {
  if (x > y) x = y;
}
template <class T>
T Abs(T x) {
  return (x < 0 ? -x : x);
}
template <class T>
T safe_sqrt(T x) {
  return sqrt(max(x, (T)0));
}
template <class T, class U, class V>
T addmod(T x, U k, V MOD) {
  return ((x + k) % MOD + MOD) % MOD;
}
template <class T, class U, class V>
T submod(T x, U k, V MOD) {
  return ((x - k) % MOD + MOD) % MOD;
}
template <class T, class U, class V>
T mul(T x, U y, V MOD) {
  return (long long)x * y % MOD;
}
namespace task {
const int N = 2e5 + 5;
bool vis[N][2], ok[N][2];
long long dp[N][2];
int a[N];
int n;
bool buildGraph(int u, bool flag) {
  if (vis[u][flag]) return ok[u][flag];
  if (!u) return true;
  vis[u][flag] = true;
  int v = u + (flag ? -1 : 1) * a[u];
  if (v <= 0 or v > n) v = 0;
  return ok[u][flag] = buildGraph(v, flag ^ 1);
}
long long f(int u, bool flag) {
  if (!u or !ok[u][flag]) return 0ll;
  if (dp[u][flag] != -1) return dp[u][flag];
  long long ret = 0;
  int v = u + (flag ? -1 : 1) * a[u];
  if (v <= 0 or v > n) v = 0;
  ret = 1ll * a[u] + f(v, flag ^ 1);
  return dp[u][flag] = ret;
}
void solve() {
  scanf("%d", &n);
  for (int i = 2; i <= n; ++i) scanf("%d", a + i);
  for (int u = 2; u <= n; ++u) buildGraph(u, true);
  memset(dp, -1ll, sizeof(dp));
  for (int u = 2; u <= n; ++u) f(u, true);
  for (int u = 2; u <= n; ++u) {
    if (!ok[u][true])
      puts("-1");
    else
      printf("%lld\n", dp[u][true] + 1ll * u - 1ll);
  }
}
}  // namespace task
int main(void) { task::solve(); }
