Tim Brown published a game “Rolling Balls”.
In this game, the player’s target is to roll balls with different colors into a moving bag as more as possible. A ball can be represented by its color (r, g, b).
Unfortunately, some unscrupulous players always want to cheat in the game.
Therefore, Tim hires you to make a cheating detection system CDSystem, which monitors and simulates the game progress to figure out any impossible data modification.
Your task is to complete a data structure called MultiSet, which can be implemented using Binary Search Tree as MultiSet_Tree.
In this problem, a MultiSet is used to represent a moving bag, into which balls with different colors can be rolled.
MultiSet is a data structure that supports the following operations:
Example:
The MultiSet MS={a,b,y,y}. Search(a) = 1, Search(y) = 2, Search(x) = 0.
After Insert(x) and Delete(y), MS={a,b,x,y}. Then, Search(y) = 1, Search(x) = 1.
MultiSet_Tree is MultiSet implemented using Binary Search Tree, where the tree nodes store the elements and their amounts in the set. The Insert and Delete operations of MultiSet_Tree can be further explained as follows:
In this problem, a MultiSet_Tree node represents a specific ball color (r, g, b).
To implement Binary Search Tree, the greatness/smallness (<, >, ==) between two colors is determined sequentially below:
Color: operators <, >, ==, =, where the assignment operator = is needed when you make/modify MultiSet_Tree Nodes.Node: Constructor, DestructorMultiSet_Tree: Constructor, Destructor, Insert, Delete, SearchSupposing Node x with amount ==1 is to be deleted, three possible sub-cases should be considered:
NULL.

The first line gives the number of test cases T.
Each case consists of one integer N and N lines of operations.
Each operation opi is with one of the following formats:
MultiSet_Tree in the level-order traversal, where the key is color (r, g, b).It’s guaranteed that:
For each test case, output one line with “Case #x:”, where x is the test case number (starting from 1).
Then print the result of each “? r g b”/“PrintSet” for one line.
Remember '\n' for the end of each line.