Once upon a time, Nikita was relaxing at home and watching a Christmas garland. The light bulbs were flickering following some strange pattern.
Let us formalize the garland's description. It consists of n colored light bulbs. Every light bulb is either on or off at any moment. Initially, all of them are off.
Sometimes all light bulbs of one color change their states to the opposite. After each such change, Nikita wants to know the number of maximal non-empty continuous segments of lit bulbs. A lit segment is maximal if it is not contained in any other lit segment.
The first line contains integers n, k and q: the number of light bulbs, the number of different colors and the number of changes of the garland (1≤n,q≤2⋅105, 1≤k≤n).
The second line contains n integers c_1,c_2,…,c_n: the colors of light bulbs in the garland (1≤c_i≤k).
Next q lines describe changes of the garland in the order they happened. Each of these lines contains an integer d_i, the color of light bulbs which have just changed their states (1≤d_i≤k).
The output must contain q lines. The i-th line must contain one integer: the number of maximal continuous segments of lit bulbs after i-th change.