n,k=map(int,raw_input().split()) for v in range(n**k):i=k;exec'i-=1;print v/n**i%n+1,;'*k;print
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page