input""a,b for i=0to a^b-1n=i r$="" s$="" for j=1to b r$=str$(mod(n,a)+1)+s$+r$ s$=" " n=int(n/a)next ?r$next