#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];
}
}
int egal = 0;
for (int i = 1; i <= n; ++i) {
for (int j = 1; j <= n; ++j) {
if (mat[i][j] == mat[i][j + 1]) {
++egal;
if (mat[i][j] == 0 && egal == 3) {
cout << "jucatorul 0";
} else if (mat[i][j] == 1 && egal == 3) {
cout << "jucatorul X";
}
}
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbiwgbWF0WzRdWzRdOwoJY2luID4+IG47Cglmb3IgKGludCBpID0gMTsgaSA8PSBuOyArK2kpIHsKCQlmb3IgKGludCBqID0gMTsgaiA8PSBuOyArK2opIHsKCQkJY2luID4+IG1hdFtpXVtqXTsKCQl9Cgl9CglpbnQgZWdhbCA9IDA7Cglmb3IgKGludCBpID0gMTsgaSA8PSBuOyArK2kpIHsKCQlmb3IgKGludCBqID0gMTsgaiA8PSBuOyArK2opIHsKCQkJaWYgKG1hdFtpXVtqXSA9PSBtYXRbaV1baiArIDFdKSB7CgkJCQkrK2VnYWw7CgkJCQlpZiAobWF0W2ldW2pdID09IDAgJiYgZWdhbCA9PSAzKSB7CgkJCQkJY291dCA8PCAianVjYXRvcnVsIDAiOwoJCQkJfSBlbHNlIGlmIChtYXRbaV1bal0gPT0gMSAmJiBlZ2FsID09IDMpIHsKCQkJCQljb3V0IDw8ICJqdWNhdG9ydWwgWCI7CgkJCQl9CgkJCX0KCQl9Cgl9IAoJcmV0dXJuIDA7Cn0=