#include <iostream>
#include <fstream>
using namespace std;
int m,n,a[20][20];
int main(){
ifstream f("matrice.in")
f >> n >> m;
int i,j, suma, exista;
for (i=0;i<n;i++)
for (j=0;j<n;j++)
f >> a[i][j];
exista = 0;
for (i=0;i<n;i++){
suma = 0;
for (j=0;j<n;j++)
suma += a[i][j];
if (suma%2){
cout << i << " ";
exista = 1;
}
}
}