#include #include #include char first[5]; char second[5]; char third[5]; int main() { scanf("%s", first); scanf("%s", second); scanf("%s", third); if (strcmp(first, ":::") == 0 && strcmp(second, ":o:") == 0 && strcmp(third, ":::") == 0) { printf("1\n"); } else if (strcmp(first, ":::") == 0 && strcmp(second, "o:o") == 0 && strcmp(third, ":::") == 0) { printf("2\n"); }else if (strcmp(first, ":o:") == 0 && strcmp(second, ":::") == 0 && strcmp(third, ":o:") == 0) { printf("2\n"); }else if (strcmp(first, "o::") == 0 && strcmp(second, ":o:") == 0 && strcmp(third, "::o") == 0) { printf("3\n"); }else if (strcmp(first, "::o") == 0 && strcmp(second, ":o:") == 0 && strcmp(third, "o::") == 0) { printf("3\n"); }else if (strcmp(first, "o:o") == 0 && strcmp(second, ":::") == 0 && strcmp(third, "o:o") == 0) { printf("4\n"); }else if (strcmp(first, "o:o") == 0 && strcmp(second, ":o:") == 0 && strcmp(third, "o:o") == 0) { printf("5\n"); }else if (strcmp(first, "ooo") == 0 && strcmp(second, ":::") == 0 && strcmp(third, "ooo") == 0) { printf("6\n"); }else if (strcmp(first, "o:o") == 0 && strcmp(second, "o:o") == 0 && strcmp(third, "o:o") == 0) { printf("6\n"); } else { printf("unknown\n"); } return 0; }