#include <iostream>
using namespace std;
int main() {
int n, mat[4][4];
cin >> n;
for (int i = 1; i <= n; ++i) {
for (int j = 1; j <= n; ++j) {
cin >> mat[i][j];
}
}
for (int i = 1; i <= n; ++i) {
int egal = 0;
int aux = mat[i][n];
for (int j = 1; j <= n; ++j) {
if (aux == mat[i][j]) {
++egal;
}
if (egal > 2) {
if (mat[i][j] == 1) {
cout << "jucatorul X";
return 0;
} else if (mat[i][j] == 0) {
cout << "jucatorul 0";
return 0;
}
}
}
cout << egal << " ";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbiwgbWF0WzRdWzRdOwoJY2luID4+IG47Cglmb3IgKGludCBpID0gMTsgaSA8PSBuOyArK2kpIHsKCQlmb3IgKGludCBqID0gMTsgaiA8PSBuOyArK2opIHsKCQkJY2luID4+IG1hdFtpXVtqXTsKCQl9Cgl9Cglmb3IgKGludCBpID0gMTsgaSA8PSBuOyArK2kpIHsKCQlpbnQgZWdhbCA9IDA7CgkJaW50IGF1eCA9IG1hdFtpXVtuXTsKCQlmb3IgKGludCBqID0gMTsgaiA8PSBuOyArK2opIHsKCQkJaWYgKGF1eCA9PSBtYXRbaV1bal0pIHsKCQkJCSsrZWdhbDsKCQkJfQoJCQlpZiAoZWdhbCA+IDIpIHsKCQkJCWlmIChtYXRbaV1bal0gPT0gMSkgewoJCQkJCWNvdXQgPDwgImp1Y2F0b3J1bCBYIjsKCQkJCQlyZXR1cm4gMDsKCQkJCX0gZWxzZSBpZiAobWF0W2ldW2pdID09IDApIHsKCQkJCQljb3V0IDw8ICJqdWNhdG9ydWwgMCI7CgkJCQkJcmV0dXJuIDA7CgkJCQl9CgkJCX0KCQl9CgkJY291dCA8PCBlZ2FsIDw8ICIgIjsKCX0KCXJldHVybiAwOwp9