a="$System.in".split()*.toLong() a[0].times{s=it%2*2 println(("1 0 "*16)[s..s+a[1]*2-2])}