#include <bits/stdc++.h>
using namespace std;
int *A, n;
long long int ans[200009];
long long int rec(int i, int f) {
  long long int c;
  if (i > n || i <= 0) return 0;
  if (ans[i] == -2 && f == 1) {
    ans[i] = -1;
    return -1;
  } else if (ans[i] != 0 && f == 1)
    return ans[i];
  if (f == 1) {
    ans[i] = -2;
    c = rec(i - A[i], 0);
    if (c == -1)
      ans[i] = -1;
    else
      ans[i] = A[i] + c;
    return ans[i];
  } else if (f == 0) {
    c = rec(i + A[i], 1);
    if (c == -1)
      return -1;
    else
      return c + A[i];
  }
}
int main() {
  int i, j;
  long long int c;
  cin >> n;
  A = new int[n + 1];
  for (int i = 0; i < n + 1; i++) {
    A[i] = 0;
    ans[i] = 0;
  }
  for (i = 2; i <= n; i++) cin >> A[i];
  for (i = 1; i < n; i++) {
    c = rec(i + 1, 1);
    if (c == -1)
      cout << "-1" << endl;
    else
      cout << i + c << endl;
  }
}
