You are given a permutation {, , , ..., }. Remove elements one by one, and output the number of inversion pairs before each removal. The number of inversion pairs in an array is the number of ordered pairs (, ) such that < and A_i > A_j.
Consists of several tests. The first line of each test contains two integers and (1 \le n \le 2 \cdot 10^5, 1 \le m \le 10^5). Next, lines follow, specifying the initial permutation. The following lines contain the numbers to be removed, in the order they are removed. No number is removed twice.
For each removal, output the number of inversion pairs before it.
(, , , , ) -> (, , , ) -> (, , ) -> (, ) -> ()
Ejemplo 1