#include<stdio.h>
int main(void) {
	int j,n,i,k,score,count;
	int l[256][3];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d%d",&l[i][0],&l[i][1],&l[i][2]);
	}
	for(i=0;i<n;i++){
		score=0;
		for(j=0;j<3;j++){
			count=0;
			for(k=0;k<n;k++){
				if(l[k][j]==l[i][j]){
					count++;
				}
			}
			if(count==1){
				score+=l[i][j];
			}
		}
		printf("%d\n",score);
	}
	return 0;
}