#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 321;
long long in[maxn], dp[maxn];
bool mark[maxn], in_q[maxn];
int n;
void fill_dp(long long x) {
  long long first_x = x;
  in_q[first_x] = 1;
  mark[x] = 1;
  if (x + in[x] >= n) {
    dp[first_x] = in[x];
    in_q[first_x] = 0;
    return;
  }
  dp[first_x] += in[x];
  x += in[x];
  if (x - in[x] < 0) {
    dp[first_x] += in[x];
    in_q[first_x] = 0;
    return;
  }
  dp[first_x] += in[x];
  x -= in[x];
  if (x == 0 || in_q[x]) {
    dp[first_x] = -1;
    return;
  }
  if (!mark[x]) fill_dp(x);
  if (dp[x] == -1)
    dp[first_x] = -1;
  else
    dp[first_x] += dp[x];
  in_q[first_x] = 0;
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i < n; i++) cin >> in[i];
  for (long long i = 1; i < n; i++)
    if (!mark[i]) fill_dp(i);
  for (int i = 1; i < n; i++) {
    long long sum = i;
    if (i - in[i] < 0)
      cout << sum + in[i] << endl;
    else if (i - in[i] == 0 || dp[i - in[i]] == -1)
      cout << -1 << endl;
    else {
      cout << sum + in[i] + dp[i - in[i]] << endl;
    }
  }
  return 0;
}
