Count
For a given sequence of integers A={a0,a1,...,an−1}, perform the following operations.
count(b,e,k): print the number of the specific values k in ab,ab+1,...,ae−1.
Input
The input is given in the following format.
n
a0 a1,...,an−1
q
b1 e1 k1
b2 e2 k2
:
bq eq kq
The number of elements n and each element ai are given in the first line and the second line respectively. In the third line, the number of queries q is given and the following q lines, q integers bi be ki are given as queries.
Output
For each query, print the number of specified values.