
The first line contains a single integer ‘T’, denoting the number of test cases.
The first line of each test case contains two integers ‘M’ and ‘N’ denoting the number of elements in the given “ARR” and the integer denoting the upper limit of the range.
The next line of each test case contains ‘M’ space-separated integers denoting elements of “ARR”.
For each test case, print space-separated strings denoting operations required to create the given “ARR”.
Print the output of each test case in a separate line.
1. You don’t need to print anything. It has already been taken care of. Just implement the given function.
2. It is guaranteed that the answer is unique.
1 <= T <= 10
1 <= N <= 10^5
1 <= M <= 10^5
1 <= ARR[i] <= N
Where 'ARR[i]' is the element of the given array at index ‘i’.
Time limit: 1 sec
The basic idea is that for every element, the first operation will always be the ‘Add’. If the element is not present in the ‘ARR’ array then we need to do a ‘Remove’ operation otherwise we will take the next element from the range.
Algorithm