``
#include <stdio.h>

int main() {
    char arr[3][3];
    int i, j;
    int flag = 0;

    for (i = 0; i < 3; i++) {
        for (j = 0; j < 3; j++) {
            arr[i][j] = getchar();
            getchar();
        }
    }

    for (i = 0; i < 3; i++) { //三行
        if (arr[i][0] == 'K' && arr[i][1] == 'K' && arr[i][2] == 'K') {
            flag = 1;
            break;
        }
    }

    for (i = 0; i < 3; i++) { ///三列
        if (arr[0][i] == 'K' && arr[1][i] == 'K' && arr[2][i] == 'K') {
            flag = 1;
            break;
        }
    }

    if (arr[0][0] == 'K' && arr[1][1] == 'K' && arr[2][2] == 'K') //主对角线
        flag = 1;
    if (arr[0][2] == 'K' && arr[1][1] == 'K' && arr[2][0] == 'K') //副对角线
        flag = 1;

    for (i = 0; i < 3; i++) { //三行
        if (arr[i][0] == 'B' && arr[i][1] == 'B' && arr[i][2] == 'B') {
            flag = -1;
            break;
        }
    }

    for (i = 0; i < 3; i++) { //三列
        if (arr[0][i] == 'B' && arr[1][i] == 'B' && arr[2][i] == 'B') {
            flag = -1;
            break;
        }
    }

    if (arr[0][0] == 'B' && arr[1][1] == 'B' && arr[2][2] == 'B') //主对角线
        flag = -1;
    if (arr[0][2] == 'B' && arr[1][1] == 'B' && arr[2][0] == 'B') //副对角线
        flag = -1;

    if (flag == 1)
        printf("KiKi wins!\n");
    else if (flag == 0)
        printf("No winner!\n");
    else
        printf("BoBo wins!\n");
    return 0;
}