#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000 * 100 * 2 + 10;
int a[MAXN];
long long Y2[MAXN], Y3[MAXN];
int mark2[MAXN], mark3[MAXN];
int n;
int A = 1;
int dfs3(int v);
int dfs2(int v) {
  mark2[v] = A;
  int u = v + a[v];
  Y2[v] += a[v];
  if (u <= 0 or u > n) return Y2[v];
  if (mark3[u] == A or Y3[u] == -1) return (Y2[v] = -1);
  if (mark3[u] == 0) dfs3(u);
  if (Y3[u] == -1) return (Y2[v] = -1);
  return (Y2[v] += Y3[u]);
}
int dfs3(int v) {
  mark3[v] = A;
  int u = v - a[v];
  Y3[v] += a[v];
  if (u <= 0 or u > n) return Y3[v];
  if (mark2[u] == A or Y2[u] == -1) return (Y3[v] = -1);
  if (mark2[u] == 0) dfs2(u);
  if (Y2[u] == -1) return (Y3[v] = -1);
  return (Y3[v] += Y2[u]);
}
int main() {
  cin >> n;
  for (int i = 2; i <= n; i++) cin >> a[i];
  for (int i = 2; i <= n; i++)
    if (mark3[i] == 0) {
      dfs3(i);
      A++;
    }
  for (int i = 1; i <= n - 1; i++) {
    if (Y3[1 + i] == -1)
      cout << -1 << endl;
    else
      cout << i + Y3[1 + i] << endl;
  }
  return 0;
}
