#include <stdio.h>
#include <math.h>

int count[3][1001];
int data[1000][3];

int main() {
	int N,i,j,k;
	scanf("%d", &N);
	for (i = 0; i < N; i++) {
		for (j = 0; j < 3; j++) {
			scanf("%d", &k);
			data[i][j] = k;
			count[j][k]++;
		}
	}
	for (i = 0; i < N; i++) {
		int sum = 0;
		for (j = 0; j < 3; j++) {
			if (count[j][data[i][j]] == 1) sum += data[i][j];
		}
		printf("%d\n", sum);
	}
	return 0;
}