#include <bits/stdc++.h>
using namespace std;
long long int cor[200018][2], n, a[200018], ans[200018][2];
void dfs(int u, int t) {
  int v = u + a[u] * (t ? -1 : 1);
  cor[u][t] = -1;
  if (v <= 0 || v > n) {
    cor[u][t] = 1;
    ans[u][t] = a[u];
    return;
  }
  if (v == 1 || cor[v][t ^ 1] == -1) {
    cor[u][t] = 1;
    ans[u][t] = -1;
    return;
  }
  if (!cor[v][t ^ 1]) dfs(v, t ^ 1);
  if (ans[v][t ^ 1] == -1)
    ans[u][t] = -1;
  else
    ans[u][t] = ans[v][t ^ 1] + a[u];
  cor[u][t] = 1;
}
int main() {
  scanf("%I64d", &n);
  for (int i = 2; i < n + 1; i++) scanf("%I64d", &a[i]);
  for (int i = 2; i < n + 1; i++)
    if (!cor[i][1]) dfs(i, 1);
  for (int i = 1; i < n; i++)
    printf("%I64d\n", ans[1 + i][1] == -1 ? -1 : i + ans[1 + i][1]);
}
