Problem: RedDreamer has an array consisting of non-negative integers, and an unlucky integer .
Let's denote the misfortune of array having length as — the number of pairs of integers such that and . RedDreamer has to paint each element of into one of two colors, white and black (for each element, the color is chosen independently), and then create two arrays and so that all white elements belong to , and all black elements belong to (it is possible that one of these two arrays becomes empty). RedDreamer wants to paint the elements in such a way that is minimum possible.
For example:
- if , and , it is possible to paint the -st, the -th and the -th elements white, and all other elements black. So , , and ;
- if , and , it is possible to paint the -st element white, and all other elements black. So , , and .
Help RedDreamer to paint the array optimally!
Input Format: The first line contains one integer () — the number of test cases. Then test cases follow.
The first line of each test case contains two integers and (, ) — the number of elements in the array and the unlucky integer, respectively.
The second line contains integers , , ..., () — the elements of the array.
The sum of over all test cases does not exceed .
Output Format: For each test case print integers: , , ..., (each is either or ) denoting the colors. If is , then is white and belongs to the array , otherwise it is black and belongs to the array .
If there are multiple answers that minimize the value of , print any of them.