#include"bits/stdc++.h"
using namespace std;

int main(){

	int N;
	cin >> N;
	int written[200][3];
	int score[200];

	for(int i = 0; i < N; i++){
		cin >> written[i][0] >> written[i][1] >> written[i][2];
		score[i] = 0;
	}
	
	for(int game = 0; game < 3; game++){
		for(int i = 0; i < N; i++){
			bool UNI = true;
			for(int j = 0; j < N; j++){
				if(i == j) continue;
				if(written[i][game] == written[j][game]){
					UNI = false;
				}
			}
			if(UNI)score[i] += written[i][game];
		}
	}

	
	for(int i = 0; i < N; i++){
		cout << score[i] << endl;
	}

	return 0;
}
