There are two positive integersin the first line .
The second line haspositive integers indicates
.
The third line haspositive integers indicates
.
Then an positive integerin a new line .
Thenline follows , each line begins with an integer
, then
integers indicates
(
if
) .
Two adjacent integers in the same line are separated by a space .
The sum ofin
queries is less than or equal to
.
For each question , print an integer in one line indicates the answer .