a,b=gets.split.map{|x|x.to_i} a.times{|x|s=[];t=(x+1)%2 b.times{|y|s<