program cch(input,output);
var
i,j:integer;
a,tot:array[1..100] of integer;
s:string;
function change(x:char):integer;
begin
if x='/' then exit(10)
else exit(ord(x)-48);
end;
begin
assign(input,'bowling.in');
assign(output,'bowling.out');
reset(input);
rewrite(output);
readln(s);
while pos(' ',s)<>0 do delete(s,pos(' ',s),1);
j:=1;
for i:=1 to 10 do
if s[j]='/' then
begin
a[i]:=10;
if s[j+1]<>'/' then
begin
if s[j+2]='/' then inc(a[i],10)
else a[i]:=a[i]+change(s[j+1])+change(s[j+2]);
end
else
a[i]:=a[i]+10+change(s[j+2]);
inc(j);
end
else
begin
if s[j+1]='/' then a[i]:=10+change(s[j+2])
else a[i]:=change(s[j])+change(s[j+1]);
j:=j+2;
end;
tot[1]:=a[1];
for i:=2 to 10 do
tot[i]:=tot[i-1]+a[i];
for i:=1 to 10 do write(a[i],' ');
writeln;
for i:=1 to 10 do write(tot[i],' ');
close(input);
close(output);
end.