#include <iostream>

using namespace std;

#define REP(i,n) for (int i=0;i<(n);++i)

int n;
int data[3][200];
int score[200];

bool isUnique(int a[], int x) {
	REP(i,n) {
		if (i == x) continue;
		if (a[i] == a[x]) return false;
	}
	return true;
}


int main() {
	cin >> n;
	REP(i,n) cin >> data[0][i] >> data[1][i] >> data[2][i];

	REP(i,n) {
		REP(j,3) {
			if (isUnique(data[j], i))
				score[i] += data[j][i];
		}
	}

	REP(i,n) cout << score[i] << endl;

	return 0;
}