import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[][] array = new String[3][3]; for (int i = 0; i < 3; i++) { String[] arr = br.readLine().split(" "); array[i] = arr; } if (isWinner(array, "K")) { System.out.println("KiKi wins!"); } else { System.out.println(isWinner(array, "B") ? "BoBo wins!" : "No winner!"); } } public static boolean isWinner(String[][] arr, String str) { String win = str + str + str; StringBuilder sb1 = new StringBuilder(); sb1.append(arr[0][0]).append(arr[0][1]).append(arr[0][2]); if (sb1.toString().equals(win)) return true; StringBuilder sb2 = new StringBuilder(); sb2.append(arr[1][0]).append(arr[1][1]).append(arr[1][2]); if (sb2.toString().equals(win)) return true; StringBuilder sb3 = new StringBuilder(); sb3.append(arr[2][0]).append(arr[2][1]).append(arr[2][2]); if (sb3.toString().equals(win)) return true; StringBuilder sb4 = new StringBuilder(); sb4.append(arr[0][0]).append(arr[1][0]).append(arr[2][0]); if (sb4.toString().equals(win)) return true; StringBuilder sb5 = new StringBuilder(); sb5.append(arr[0][1]).append(arr[1][1]).append(arr[2][1]); if (sb5.toString().equals(win)) return true; StringBuilder sb6 = new StringBuilder(); sb6.append(arr[0][2]).append(arr[1][2]).append(arr[2][2]); if (sb6.toString().equals(win)) return true; StringBuilder sb7 = new StringBuilder(); sb7.append(arr[0][0]).append(arr[1][1]).append(arr[2][2]); if (sb7.toString().equals(win)) return true; return (arr[0][2] + arr[1][1] + arr[2][0]).equals(win); } }