<reponame>pparkddo/ps<filename>boj/1392.py<gh_stars>1-10
table, questions = [], []

count, question_count = map(int, input().split())

for sheet in range(1, count+1):
    table.extend([sheet] * int(input()))

for _ in range(question_count):
    questions.append(int(input()))

for question in questions:
    print(table[question])

table, questions = [], []

count, question_count = map(int, input().split())

for sheet in range(1, count+1):
    table.extend([sheet] * int(input()))

for _ in range(question_count):
    questions.append(int(input()))

for question in questions:
    print(table[question])