This is a two-step problem.
Alice and Bob are famous magicians. Together with their assistant Catherine, they decide to perform the following trick at a magic contest.
0 or 1, at an arbitrary position of the string and gives the resulting string to Bob.The input of the first execution is given in the following format.
0
In the first execution, print one binary string for Catherine on each of lines.
If the length printed for the -th test case is , it must satisfy .
Bob must correctly recover the original string for every test case. If any string is not recovered correctly, the submission receives points.
Otherwise, the score depends on the lengths of the strings printed by Alice. For the -th test case, let be the original length and let be the length printed by Alice. Define as follows.
The input of the second execution is given in the following format.
1
In the second execution, print the original string for each test case in the order given in the input, one string per line.
The score of the -th test case is
The base of the logarithm does not affect the score. The final score is the minimum over all test cases in all private judge tests.
In particular, gives points for that test case. The formula is well-defined even for small .