Alice has string $$$s$$$ and Bob has string $$$t$$$, both initially equal to the single-character string "a". There are $$$q$$$ operations. Each operation is one of the following:
After each operation, both players may reorder the characters of their current strings to form the lexicographically smallest possible string. They then compare these two strings:
Both players play optimally at every step. Determine and output the result after each operation.
The first line contains an integer $$$T$$$ ($$$1 \le T \le 10^4$$$), the number of test cases.
Then follow $$$T$$$ test cases. Each test case begins with a line containing a single integer $$$q$$$ ($$$1 \le q \le 2\cdot10^5$$$), the number of operations.
Each of the next $$$q$$$ lines has: op x k
where:
It is guaranteed that across all test cases, the total length of all appended strings i.e. $$$\sum |x| $$$ does not exceed $$$4\cdot10^5$$$.
For each operation in each test case, print one line:
231 aa 42 ab 32 aa 411 a 1
Bob Alice Alice Bob
A string $$$p$$$ is lexicographically smaller than a string $$$q$$$ if :
| Название |
|---|


