import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        char[][] arr = new char[3][3];
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[i].length; j++) {
                arr[i][j] = scan.next().charAt(0);
            }
        }
        
        //竖
        for (int i = 0; i < arr.length; i++) {
            if (arr[0][i] == arr[1][i] && arr[0][i] == arr[2][i] ) {
                if (arr[0][i] == 'K') {
                    System.out.println("KiKi wins!");
                    return;
                } else if (arr[0][i] == 'B') {
                    System.out.println("BoBo wins!");
                    return;
                }
            }
        }
        //横
        for (int i = 0; i < arr.length; i++) {
            if (arr[i][0] == arr[i][1] && arr[i][0] == arr[i][2]) {
                if (arr[i][1] == 'K') {
                    System.out.println("KiKi wins!");
                    return;
                } else if (arr[i][1] == 'B') {
                    System.out.println("BoBo wins!");
                    return;
                }
            }
        }

        if (arr[0][0] == arr[1][1] && arr[1][1] == arr[2][2]) {
            if (arr[1][1] == 'K') {
                System.out.println("KiKi wins!");
                return;
            } else if (arr[1][1] == 'B') {
                System.out.println("BoBo wins!");
                return;
            }
        }
        
        
        if (arr[0][2] == arr[1][1] && arr[0][2] == arr[2][0]) {
            if (arr[1][1] == 'K') {
                System.out.println("KiKi wins!");
                return;
            } else if (arr[1][1] == 'B') {
                System.out.println("BoBo wins!");
                return;
            }
        }
        
        System.out.println("No winner!");
        
    }
}