#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;++i)
using namespace std;
int main(){
  int n;
  int a[201],b[201],c[201];
  cin>>n;
  rep(i,0,n) cin>>a[i]>>b[i]>>c[i];
  rep(i,0,n){
    int ca=0,cb=0,cc=0;
    rep(j,i+1,n){
      if(a[i]==a[j]){
	a[j]=0; ca=1;
      }
      if(b[i]==b[j]){
	b[j]=0; cb=1;
      }
      if(c[i]==c[j]){
	c[j]=0; cc=1;
      }
    }
    if(ca) a[i]=0;
    if(cb) b[i]=0;
    if(cc) c[i]=0;
  }
  rep(i,0,n) cout<<a[i]+b[i]+c[i]<<endl;
  return 0;
}