#include ifstream in("error.in"); int n, i, j; int m[100][100]; int sumr[100], sumd[100]; main() { while(1) { in >> n; if (n == 0) return 0; for (i = 0; i < n; i++) sumd[i] = 0; for (i = 0; i < n; i++) { sumr[i] = 0; for (j = 0; j < n; j++) { in >> m[i][j]; sumr[i] = (sumr[i] + m[i][j]) & 1; sumd[j] = (sumd[j] + m[i][j]) & 1; } } int rnok = -1; int dnok = -1; for (i = 0; i < n; i++) { if (sumr[i] != 0) { if (rnok != -1) { cout << "Corrupt"; goto next; } else rnok = i; } if (sumd[i] != 0) { if (dnok != -1) { cout << "Corrupt"; goto next; } else dnok = i; } } if (rnok == -1 && dnok == -1) cout << "OK"; else cout << "Change bit (" << rnok + 1 << "," << dnok + 1 << ")"; next: cout << endl; } return 0; }