import java.io.*; import java.util.*; public class leftout { public static boolean[][] photo; public static void printAsInt(boolean[][] photo) { /* for (int i = 0; i < photo.length; i++) { boolean[] sub = photo[i]; for (int j = 0; j < sub.length; j++) { boolean state = sub[j]; System.out.print(state ? 0:1); System.out.print(" "); } System.out.println(); } System.out.println(); */ } public static int sumArray() { int total = 0; for (int i = 0; i < photo.length; i++) { boolean[] row = photo[i]; for (int j = 0; j < row.length; j++) { boolean k = row[j]; if(!k) { total++; } } } return total; } public static int sumArray(int x1, int y1,int x2,int y2, boolean state) { int total = 0; for (int i = x1; i <= x2; i++) { boolean[] row = photo[i]; for (int j = y1; j <= y2; j++) { boolean k = row[j]; if(k == state) { total++; } } } return total; } public static boolean checkForTrue() { //int total = 0; for (int i = 0; i < photo.length; i++) { boolean[] row = photo[i]; for (int j = 0; j < row.length; j++) { boolean k = row[j]; if(!k) { return true; } } } return false; } public static boolean checkForTrue(int x,int y) { //int total = 0; for (int i = 1; i <= x; i++) { boolean[] row = photo[i]; for (int j = 1; j <= y; j++) { boolean k = row[j]; if(k) { return true; } } } return false; } public static boolean checkForFalse(int x,int y) { //int total = 0; for (int i = 1; i <= x; i++) { boolean[] row = photo[i]; for (int j = 1; j <= y; j++) { boolean k = row[j]; if(!k) { return true; } } } return false; } public static void flipRow(int row) { for(int i = 0; i < photo[row].length; i ++) { photo[row][i] = !(photo[row][i]); } } public static void flipCol(int col) { for(int i = 0; i < photo.length; i ++) { photo[i][col] = !(photo[i][col]); } } public static void main(String[] args) throws IOException{ BufferedReader f = new BufferedReader(new FileReader("leftout.in")); final int N = Integer.parseInt(f.readLine()); photo = new boolean[N][N]; for(int i = 0; i < N; i++) { String row = f.readLine(); for(int j = 0; j < N; j ++) { char c = row.charAt(j); if(c == 'L') { photo[i][j] = true; }else if(c == 'R') { photo[i][j] = false; } } } printAsInt(photo); /* // Used to be N for(int i = 0; i < N; i ++) { if(!photo[i][0]) { flipRow(i); } } printAsInt(photo); for(int i = 0; i < N; i ++) { if(!photo[0][i]) { flipCol(i); } }*/ for (int i=1; i