#include <bits/stdc++.h>
using namespace std;
int n;
long long a[200005];
int vis[200005];
long long dp[200005];
long long bad = -1e16;
long long solve(int x) {
  if (x <= 0 || x > n) return 0;
  if (vis[x] == 1) return bad;
  if (vis[x] == 2) return dp[x];
  vis[x] = 1;
  long long nx = x + a[x], y = a[x];
  if (nx <= n) {
    y += a[nx];
    y += solve(nx - a[nx]);
  }
  vis[x] = 2;
  return dp[x] = y;
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) scanf("%I64d", &a[i]);
  vis[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (vis[i] != 2) solve(i);
  }
  long long ans;
  for (int i = 1; i < n; i++) {
    vis[1] = 0;
    a[1] = i;
    ans = solve(1);
    if (ans < 0)
      printf("-1\n");
    else
      printf("%I64d\n", ans);
  }
}
