#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
int main(){
	int n;
	cin >> n;
	vector<vector<int> >wr(n,vector<int> (3));
	for (int i = 0; i < n; i++) {
		cin >> wr[i][0] >> wr[i][1] >> wr[i][2];
	}
	for (int i = 0; i < n; i++) {
		int ans = 0;
		for (int j = 0; j < 3; j++) {
			int uni = 0;
			for (int k = 0; k < n; k++) {
				if (wr[k][j] == wr[i][j]) {
					uni++;
				}
			}
			if (uni == 1) {
				ans += wr[i][j];
			}
		}
		cout << ans << endl;
	}
}
