On the first line of the input is a single positive integer n, telling the number of test scenarios to follow. Each scenario consists of one line containing a non-empty string of zeros and ones of length at most 100.
Output
For each scenario, output one line containing the necklace decomposition of the string. The necklaces should be written as '(' necklace ')'.