use integer;$|++;my@e=(1)x5e3;for(a..zzz){$e[$_-1]+=$e[$_]/$_,$e[$_]%=$_ for reverse 1..$#e;print$e[0];$e[0]=0;$_*=10for@e;}