#include <bits/stdc++.h>
using namespace std;
const int maxint = -1u >> 1;
int n, T;
int vis[200010][2];
int x[200010];
long long f[2][200010];
long long dfs(int col, int cur) {
  if (cur <= 0 || cur > n) return 0;
  if (vis[cur][col] == T || (cur == 1 && col == 0)) {
    return -1;
  }
  if (f[col][cur] != 0) return f[col][cur];
  vis[cur][col] = T;
  long long ret;
  if (col) {
    ret = dfs(col ^ 1, cur - x[cur]);
    if (ret != -1)
      f[col][cur] = ret + x[cur];
    else
      f[col][cur] = -1;
  } else {
    ret = dfs(col ^ 1, cur + x[cur]);
    if (ret != -1)
      f[col][cur] = ret + x[cur];
    else
      f[col][cur] = -1;
  }
  if (ret != -1) ret += x[cur];
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++) scanf("%d", &x[i]);
  for (int i = 2; i <= n; i++) {
    T++;
    if (f[1][i] == 0) {
      long long ret = dfs(1, i);
      printf("%I64d\n", (ret != -1) ? ret + (long long)(i - 1) : ret);
    } else
      printf("%I64d\n",
             (f[1][i] != -1) ? f[1][i] + (long long)(i - 1) : f[1][i]);
  }
  return 0;
}
