#include <bits/stdc++.h>
using namespace std;
long long a[200001], dp[200009][3], n;
bool reached[200009][3];
long long dfs(long long pos, long long sign) {
  long long r;
  if (pos <= 0 || pos > n) {
    r = 0;
    return r;
  }
  if (dp[pos][sign + 1] != -1) {
    return dp[pos][sign + 1];
  }
  if (!reached[pos][sign + 1]) {
    reached[pos][sign + 1] = true;
    r = a[pos] + dfs(pos - (sign * a[pos]), -sign);
    dp[pos][sign + 1] = r;
    return r;
  } else {
    dp[pos][sign + 1] = -100000000000000000;
    return -100000000000000000;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  long long ans[n];
  for (int i = 2; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < 200009; i++) {
    dp[i][0] = dp[i][1] = dp[i][2] = -1;
    reached[i][0] = reached[i][1] = reached[i][2] = false;
  }
  for (int i = 1; i < n; i++) {
    if (dp[1 + i][2] == -1) {
      a[1] = i;
      dp[1][0] = dp[1][2] = -1;
      reached[1][0] = reached[1][2] = false;
      ans[i] = dfs(1ll, -1ll);
    } else {
      ans[i] = i + dp[1 + i][2];
    }
  }
  for (int i = 1; i < n; i++) {
    if (ans[i] > 0) {
      cout << ans[i] << "\n";
    } else {
      cout << "-1\n";
    }
  }
}
