#include<iostream>
using namespace std;
int main(void) {
	int n, game[201][3], ten[201] = { 0 };
	cin >> n;
	for (int i = 0;i < n;i++) {
		for (int j = 0;j < 3;j++) {
			cin >> game[i][j];
		}
	}
	for (int i = 0;i < 3;i++) {
		for (int j = 0;j < n;j++) {
			for (int k = 0;k < n;k++) {
				if (k!=j){
					if (game[j][i] == game[k][i]) {
						break;
					}
				}
				if (k == n - 1) {
					ten[j] += game[j][i];
				}
			}
		}
	}
	for (int i = 0;i < n;i++) {
		cout << ten[i] << endl;
	}
	return 0;
}