#include #include using namespace std; int n; char die[10]; char recognizeDie() { if (!strcmp(die, "::::o::::")) return '1'; if (!strcmp(die, "o:::::::o")) return '2'; if (!strcmp(die, "::o:::o::")) return '2'; if (!strcmp(die, "::o:o:o::")) return '3'; if (!strcmp(die, "o:::o:::o")) return '3'; if (!strcmp(die, "o:o:::o:o")) return '4'; if (!strcmp(die, "o:o:o:o:o")) return '5'; if (!strcmp(die, "ooo:::ooo")) return '6'; if (!strcmp(die, "o:oo:oo:o")) return '6'; return 0; } int main() { scanf("%s", die); scanf("%s", die+3); scanf("%s", die+6); char res = recognizeDie(); if (res == 0) { printf("unknown\n"); } else { printf("%c\n", res); } return 0; }