while(0<1)println{var i=readInt (""/:"2\n")((z,c)=>z+(+c+" ")*(i/{i%=c c}))trim}