#include #include using namespace std; int main() { string firstLine,secondLine,thirdLine; string one,two,two2,three,three2,four,five,six,six2; string input; one="::::o::::"; two="::o:::o::"; two2="o:::::::o"; three="::o:o:o::"; three2="o:::o:::o"; four="o:o:::o:o"; five="o:o:o:o:o"; six="o:oo:oo:o"; six2="ooo:::ooo"; while(1){ cin >> firstLine; cin >> secondLine; cin >> thirdLine; input=firstLine+secondLine+thirdLine; if(input==one) { cout << "1"; } else if((input==two)||(input==two2)) { cout << "2"; } else if((input==three)||(input==three2)) { cout << "3"; } else if(input==four) { cout << "4"; } else if(input==five) { cout << "5"; } else if((input==six)||(input==six2)) { cout << "6"; } else { cout << "unknown"; } } return 0; }