a=io.read()s=""repeat s=a.."\n"..s a,n=a:gsub("[^0]",function(i)return i-1 end,1)until n<1 print(s)