Alice and Bob are famous magicians. Together with their assistant Catherine, they decide to perform the following trick at a magic contest.
First, Bob enters a room and loses all contact with the outside. He can communicate only with Catherine. Catherine tells Alice a binary string S of length N.
Alice creates a binary string whose length is between N and 2N, inclusive, and gives it to Catherine.
Catherine inserts one character, either 0 or 1, at an arbitrary position of the string and gives the resulting string to Bob.
Bob must recover the original string S from the string he receives.
Input
The input of the first execution is given in the following format.
0TN1S1N2S2⋮NTST
The input of the second execution is given in the following format.
1TN1L1P
Output
In the first execution, print one binary string for Catherine on each of T lines.
If the length printed for the i-th test case is Mi, it must satisfy Ni≤Mi≤2Ni+100.
In the second execution, print the original string Si for each test case in the order given in the input, one string per line.
Constraints
1≤T≤1000.
1≤Ni≤200000 (1≤i≤T).
Si is a binary string of length Ni (1≤i).
∑i=1TNi≤200000.
If Mi is the length printed in the i-th test case of the first execution, then Ni≤ ().
In the second execution, Li=Mi+1 (1≤).
Pi is a binary string of length Li (1≤i).
Each Pi is obtained by inserting one bit at an arbitrary position of the corresponding string from the first execution (1≤i≤T).
Scoring
Bob must correctly recover the original string S for every test case. If any string is not recovered correctly, the submission receives 0 points.
Otherwise, the score depends on the lengths of the strings printed by Alice. For the i-th test case, let Ni be the original length and let Mi be the length printed by Alice. Define Di as follows.
Di=max(Mi−N
The score Qi of the i-th test case is
Qi=max
The base of the logarithm does not affect the score. The final score is the minimum Qi over all test cases in all private judge tests.
In particular, Mi≤Ni+20 gives 100 points for that test case. The formula is well-defined even for small .