#include <bits/stdc++.h>
using namespace std;
int bb(const int array[], int q, int l) {
  int first = 0;
  int last = l - 1;
  int pivote;
  while (first <= last) {
    pivote = (first + last) / 2;
    if (array[pivote] >= q) {
      if (pivote == 0) {
        return pivote + 1;
      } else if (pivote > 0 && array[pivote - 1] < q) {
        return pivote + 1;
      } else {
        last = pivote - 1;
      }
    } else {
      first = pivote + 1;
    }
  }
  return -1;
}
int main() {
  int n_pilas;
  int q_quest;
  cin >> n_pilas;
  int pilas[n_pilas];
  int pilas_sum[n_pilas];
  for (int i = 0; i < n_pilas; i++) {
    cin >> pilas[i];
    if (i == 0)
      pilas_sum[i] = pilas[i];
    else
      pilas_sum[i] = pilas[i] + pilas_sum[i - 1];
  }
  cin >> q_quest;
  int quests[q_quest];
  for (int j = 0; j < q_quest; j++) {
    cin >> quests[j];
  }
  int outs[q_quest];
  for (int k = 0; k < q_quest; k++) {
    outs[k] = bb(pilas_sum, quests[k], n_pilas);
  }
  for (int l = 0; l < q_quest; l++) {
    cout << outs[l];
    cout << "\n";
  }
}
