#include <bits/stdc++.h>
using namespace std;
long long memo[200100][3], n, a[200100];
bool vis[200100][3] = {0};
long long solve(long long x, long long last) {
  if (x < 1 || x > n) return 0;
  if (memo[x][last] != -1) return memo[x][last];
  if (vis[x][last]) return -1;
  vis[x][last] = 1;
  long long ret;
  if (last == 0)
    ret = solve(x + a[x], !last);
  else
    ret = solve(x - a[x], !last);
  if (ret == -1)
    memo[x][last] = -1;
  else
    memo[x][last] = ret + a[x];
  return memo[x][last];
}
int main() {
  scanf("%lld", &n);
  for (int i = 2; i <= n; i++) scanf("%lld", &a[i]);
  memset(memo, -1, sizeof(memo));
  vis[1][0] = 1;
  for (int i = 1; i < n; i++) {
    a[1] = i;
    long long ans = solve(1 + i, 1);
    if (ans != -1) ans += i;
    printf("%lld\n", ans);
  }
  return 0;
}
