#include <stdio.h>

int N, A[212][3];
bool ok[212];
int ans[212];

int main(void) {
	scanf("%d", &N);
	for (int i = 0; i < N; ++i) { scanf("%d%d%d", &A[i][0], &A[i][1], &A[i][2]); }

	for (int i = 0; i < N; ++i) { ok[i] = true; }
	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 (A[j][i] == A[k][i]) { ok[j] = false; ok[k] = false; }
				}
			}
			if (ok[j] == true) { ans[j] += A[j][i]; }
		}
		for (int j = 0; j < N; ++j) { ok[j] = true; }
	}

	for (int i = 0; i < N; ++i) { printf("%d\n", ans[i]); }
	return 0;
}