#include <iostream>
using namespace std;
int main() {
int board[4][4];
for (int i = 1; i <= 3; ++i) {
for (int j = 1; j <= 3; ++j) {
cin >> board[i][j];
}
}
for (int i = 1; i <= 3; ++i) {
if (board[i][1] == board[i][2] && board[i][2] == board[i][3]) {
if (board[i][1] == 1) {
cout << "Jucătorul 1";
return 0;
} else if (board[i][1] == 0) {
cout << "Jucătorul 0";
return 0;
}
}
if (board[1][i] == board[2][i] && board[2][i] == board[3][i]) {
if (board[1][i] == 1) {
cout << "Jucătorul 1" << endl;
return 0;
} else if (board[1][i] == 0) {
cout << "Jucătorul 0";
return 0;
}
}
}
if (board[1][1] == board[2][2] && board[2][2] == board[3][3]) {
if (board[1][1] == 1) {
cout << "Jucătorul 1";
return 0;
} else if (board[1][1] == 0) {
cout << "Jucătorul 0";
return 0;
}
}
if (board[1][3] == board[2][2] && board[2][2] == board[3][1]) {
if (board[1][3] == 1) {
cout << "Jucătorul 1";
return 0;
} else if (board[1][3] == 0) {
cout << "Jucătorul 0";
return 0;
}
}
for (int i = 1; i <= 3; ++i) {
for (int j = 1; j <= 3; ++j) {
if (board[i][j] == 2) {
cout << "Continuă";
return 0;
}
}
}
cout << "Egal";
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgYm9hcmRbNF1bNF07Cglmb3IgKGludCBpID0gMTsgaSA8PSAzOyArK2kpIHsKCQlmb3IgKGludCBqID0gMTsgaiA8PSAzOyArK2opIHsKCQkJY2luID4+IGJvYXJkW2ldW2pdOwoJCX0KCX0KCWZvciAoaW50IGkgPSAxOyBpIDw9IDM7ICsraSkgewoJCWlmIChib2FyZFtpXVsxXSA9PSBib2FyZFtpXVsyXSAmJiBib2FyZFtpXVsyXSA9PSBib2FyZFtpXVszXSkgewoJCQlpZiAoYm9hcmRbaV1bMV0gPT0gMSkgewoJCQkJY291dCA8PCAiSnVjxIN0b3J1bCAxIjsKCQkJCXJldH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