var n=readInt;while(n>0){println(n);n-=Math.pow(10,(Math.log(n)/2.4)toInt).toInt};print(0)