var
i,n:longint;
a,b,c,d,e,f,x:array[1..1000]of longint;
begin
read(n);
for i:=1 to n do begin
read(a[i],b[i],c[i]);
inc(d[a[i]]);inc(e[b[i]]);inc(f[c[i]]);
end;
for i:=1 to n do begin
if d[a[i]]=1 then x[i]:=x[i]+a[i];
if e[b[i]]=1 then x[i]:=x[i]+b[i];
if f[c[i]]=1 then x[i]:=x[i]+c[i];
end;
for i:=1 to n do writeln(x[i]);
end.
桶排 很麻烦吗

var a,b:array[1..10000,1..3]of longint;
i,j,k,l,m,n,s:longint;
begin
readln(n);
for i:=1 to n do readln(a[i,1],a[i,2],a[i,3]);
for i:=1 to n do
begin
b[i,1]:=a[i,1];
b[i,2]:=a[i,2];
b[i,3]:=a[i,3]; end;
for i:=1 to n-1 do
for j:=i+1 to n do
begin
if a[i,1]=a[j,1] then
begin
b[i,1]:=0;
b[j,1]:=0;
end;
if a[i,2]=a[j,2] then
begin
b[i,2]:=0;
b[j,2]:=0;
end;
if a[i,3]=a[j,3] then
begin
b[i,3]:=0;
b[j,3]:=0;
end;
end;
for i:=1 to n do
writeln(b[i,1]+b[i,2]+b[i,3]);
end.

var i,j,n:longint;
s:array [1..100]of longint;
a:array[1..200,1..3]of longint;
b:array[1..200]of longint;
begin
readln(n);
for i:=1 to n do
readln(a[i,1],a[i,2],a[i,3]);
fillchar(b,sizeof(b),0);
for j:=1 to 3 do
begin
fillchar(s,sizeof(s),0);
for i:=1 to n do
inc(s[a[i,j]]);
for i:=1 to n do
if s[a[i,j]]=1 then b[i]:=b[i]+a[i,j];
end;
for i:=1 to n do
writeln(b[i]);
end.

var a,b:array[1..10000,1..3]of longint;
i,j,k,l,m,n,s:longint;
begin
readln(n);
for i:=1 to n do readln(a[i,1],a[i,2],a[i,3]);
for i:=1 to n do
begin
b[i,1]:=a[i,1];
b[i,2]:=a[i,2];
b[i,3]:=a[i,3]; end;
for i:=1 to n-1 do
for j:=i+1 to n do
begin
if a[i,1]=a[j,1] then
begin
b[i,1]:=0;
b[j,1]:=0;
end;
if a[i,2]=a[j,2] then
begin
b[i,2]:=0;
b[j,2]:=0;
end;
if a[i,3]=a[j,3] then
begin
b[i,3]:=0;
b[j,3]:=0;
end;
end;
for i:=1 to n do
writeln(b[i,1]+b[i,2]+b[i,3]);
end.

var a,b:array[1..10000,1..3]of longint;
i,j,k,l,m,n,s:longint;
begin
readln(n);
for i:=1 to n do readln(a[i,1],a[i,2],a[i,3]);
for i:=1 to n do
begin
b[i,1]:=a[i,1];
b[i,2]:=a[i,2];
b[i,3]:=a[i,3]; end;
for i:=1 to n-1 do
for j:=i+1 to n do
begin
if a[i,1]=a[j,1] then
begin
b[i,1]:=0;
b[j,1]:=0;
end;
if a[i,2]=a[j,2] then
begin
b[i,2]:=0;
b[j,2]:=0;
end;
if a[i,3]=a[j,3] then
begin
b[i,3]:=0;
b[j,3]:=0;
end;
end;
for i:=1 to n do
writeln(b[i,1]+b[i,2]+b[i,3]);
end.