var a: array [1..100,1..100] of integer;
b:array [1..100] of integer;
n,m,i,j:integer;
Begin
read(n,m);
for i:= 1 to n do
for j:= 1 to m do
read(a[i,j]);
for i:= 1 to n do begin
b[i]:=0;
for j:= 1 to m do
b[i]:=b[i]+a[i,j];
writeln('b[',i,'] = ',b[i]);
end;
End.