#include<iostream>

using namespace std;

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

int main() {
  int n;
  cin >> n;
  int a[n][3], s[n];
  rep (i, n) rep (j, 3) cin >> a[i][j];
  rep (i, n) s[i] = 0;
  rep (i, 3) rep (j, n) {
    bool ok = true;
    rep (k, n) if (j != k && a[j][i] == a[k][i]) ok = false;
    if (ok) s[j] += a[j][i];
  }
  rep (i, n) cout << s[i] << endl;
  return 0;
}