{y,x->y.times{println~('1 0 '*50)[2*it..2*it+2*x-2]}}"$System.in".split()*.toLong()