var i,j,s,num,n:integer;
a:array[0..9] of integer;
flag:boolean;
begin
flag:=true;
i:=1;
while flag do
begin
s:=0;
j:=i;
repeat
s:=s+j;
j:=j+1;
until s>=1136;
if s=1136 then flag:=false else i:=i+1;
end;
while s0 do
begin
num:=i;
repeat
n:=num mod 10;
a[n]:=a[n]+1;
num:=num div 10;
until num=0;
s:=s-i;
i:=i+1;
end;
for i:=0 to 9 do
writeln(a[i]);
end.