Movie Collection

Time limit1sMemory limit256 MB

Problem

Sanggeun is a movie DVD collector. He keeps his DVDs stacked in a single pile.

Whenever he wants to watch a movie, he locates its DVD and carefully pulls it out without toppling the pile. After finishing the movie, he places that DVD back on top of the pile.

Because Sanggeun owns so many DVDs, locating a movie takes a long time. The position of a DVD is easy to determine once you know how many DVDs are stacked on top of it. Each movie is identified by the number printed on its cover.

Write a program that, every time Sanggeun watches a movie, reports how many DVDs were on top of that DVD.

Input

The first line contains the number of test cases, which is at most $100$.

The first line of each test case contains $n$, the number of movies Sanggeun owns, and $m$, the number of movies he will watch. ($1 \le n, m \le 100{,}000$)

The second line contains the $m$ movie numbers, in the order he watches them.

Movies are numbered from $1$ to $n$. Initially the DVDs are stacked in increasing order of their numbers, and the DVD on the very top has number $1$.

Output

For each test case, print $m$ integers on a single line, separated by spaces.

The $i$-th number is the number of DVDs that were on top of the DVD when the $i$-th movie is watched. Each time Sanggeun watches a movie, he puts that DVD back on top of the pile.