#include <iostream>
using namespace std;
const int MAX_SIZE = 9;
int main() {
int n, x, y, mt[MAX_SIZE +1][MAX_SIZE + 1];
cin >> n >> x >> y;
int manhattanWay = x - 1 + y - 1, computingWay = 0;
for (int i = 1; i <= n; ++i) {
for (int j = 1; j <= n; ++j) {
cin >> mt[i][j];
if (i < x && j == y || (j < y && i == 1)) {
computingWay += mt[i][j];
}
}
}
if (manhattanWay < computingWay) {
cout << "Manhattan way";
} else if (computingWay < manhattanWay) {
cout << "Computing way";
} else {
cout << "Both ways";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY29uc3QgaW50IE1BWF9TSVpFID0gOTsKCmludCBtYWluKCkgewoJaW50IG4sIHgsIHksIG10W01BWF9TSVpFICsxXVtNQVhfU0laRSArIDFdOwoJY2luID4+IG4gPj4geCA+PiB5OwoJaW50IG1hbmhhdHRhbldheSA9IHggLSAxICsgeSAtIDEsIGNvbXB1dGluZ1dheSA9IDA7Cglmb3IgKGludCBpID0gMTsgaSA8PSBuOyArK2kpIHsKCQlmb3IgKGludCBqID0gMTsgaiA8PSBuOyArK2opIHsKCQkJY2luID4+IG10W2ldW2pdOwoJCQlpZiAoaSA8IHggJiYgaiA9PSB5IHx8IChqIDwgeSAmJiBpID09IDEpKSB7CgkJCQljb21wdXRpbmdXYXkgKz0gbXRbaV1bal07CgkJCX0KCQl9Cgl9CglpZiAobWFuaGF0dGFuV2F5IDwgY29tcHV0aW5nV2F5KSB7CgkJY291dCA8PCAiTWFuaGF0dGFuIHdheSI7Cgl9IGVsc2UgaWYgKGNvbXB1dGluZ1dheSA8IG1hbmhhdHRhbldheSkgewoJCWNvdXQgPDwgIkNvbXB1dGluZyB3YXkiOwoJfSBlbHNlIHsKCQljb3V0IDw8ICJCb3RoIHdheXMiOwoJfQoJcmV0dXJuIDA7Cn0=