#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include using namespace std; char code[5][101] = {0}; char impCode[101] = {0}; int main() { freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); int n = 0; cin >> n; string str; for (int i = 0; i < 5; ++i) { cin >> str; for (int j = 0; j < str.length(); ++j) { code[i][j] = str[j]; } } for (int i = 0; i < n; ++i) { bool hasX = false; bool hasPoint = false; for (int j = 0; j < 5; ++j) { if (code[j][i] == '.') hasPoint = true; if (code[j][i] == 'X') hasX = true; } if (hasX && hasPoint) { cout << -1 << endl; return 0; } if (hasX) { impCode[i] = 1; continue; } if (hasPoint) { impCode[i] = 2; } } for (int i = 0; i < n; ++i) { } vector answer; return 0; }