#include <iostream>
using namespace std;
int main() {
int mat[100][100], n, m;
cin >> n >> m;
for (int i = 1; i <= n; ++i) {
int findEven = 0;
for (int j = 1; j <= m; ++j) {
cin >> mat[i][j];
if (mat[i][j] % 2 == 0) {
++findEven;
}
}
if (findEven == 0) {
cout << i << " ";
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbWF0WzEwMF1bMTAwXSwgbiwgbTsKCWNpbiA+PiBuID4+IG07Cglmb3IgKGludCBpID0gMTsgaSA8PSBuOyArK2kpIHsKCQlpbnQgZmluZEV2ZW4gPSAwOwoJCWZvciAoaW50IGogPSAxOyBqIDw9IG07ICsraikgewoJCQljaW4gPj4gbWF0W2ldW2pdOwoJCQlpZiAobWF0W2ldW2pdICUgMiA9PSAwKSB7CgkJCQkrK2ZpbmRFdmVuOwoJCQl9CgkJfQoJCWlmIChmaW5kRXZlbiA9PSAwKSB7CgkJCWNvdXQgPDwgaSA8PCAiICI7CgkJfQoJfQoJcmV0dXJuIDA7Cn0=