P17575 [CodeChef] DIFSTR
提高-
题目描述

Read problems statements in [Mandarin Chinese], [Russian], and [Bengali] as well.

You are given N binary strings of length N each. You need to find a binary string of length N which is different from all of the given strings.

Note:

A binary string is defined as a string consisting only of '0' and '1'.
A string is considered different from another string when they have different lengths, or when they differ in at least one position.

------ Input Format ------

  • The first line will contain T - the number of test cases. Then the test cases follow.

  • The first line of each test case contains N - the number of strings and length of strings.

  • Each of the next N lines contains a binary string of length N.

------ Output Format ------

For each test case, print on one line a binary string of length N, which is different from all of the given strings. If there are multiple possible answers, print any.

------ Constraints ------

$1 ≤ T ≤ 100$
$1 ≤ N ≤ 100$

----- Sample Input 1 ------
2
3
101
110
100
4
1100
1010
0100
0010
----- Sample Output 1 ------
111
1101
----- explanation 1 ------
Test case $1$: $111$ is different from $101$ , $110$ , $100$.

Test case $2$: $1101$ is different from $1100$ , $1010$ , $0100$ , $0010$.

输入格式

见题面

输出格式

见题面

样例输入
2 3 101 110 100 4 1100 1010 0100 0010
样例输出
111 1101