import java.util.*; import java.util.stream.*; import static java.lang.Math.*; public class Main { private void solve() { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); sc.nextLine(); String[][] mat = new String[n][n]; int[] nyan = new int[n]; for(int r=0; r