r=io.read y=r'*n'x=r()for i=1,y do j=3-i%2*2 print(('1 0 '):rep(16):sub(j,j+x*2-2))end