#include using namespace std; const char die[6][10]={ "::::o::::", "::o:::o::", "::o:o:o::", "o:o:::o:o", "o:o:o:o:o", "ooo:::ooo" }; int main(){ cout.sync_with_stdio(false); char inputs[9]; bool result = true; for (int i = 0; i < 9; i++) cin >> inputs[i]; for (int i = 0; i < 6; i++){ for(int j = 0; j < 9; j++){ if(die[i][j] != inputs[j]) { result = false; break; } } if (result) { cout << i+1 << '\n'; break; } if (i != 5)result = true; } if (!result) cout << "unknown\n" ; return 0; }