#include <iostream>
using namespace std;

int main(){
  int n;
  int num[200][3],pt[200] = {},game[101];
  cin >> n;
  for(int i = 0;i < n;i++){
    for(int j = 0;j < 3;j++) cin >> num[i][j];
  }
  for(int i = 0;i < 3;i++){
    for(int j = 0;j < 101;j++) game[j] = -1;
    for(int j = 0;j < n;j++){
      if(game[num[j][i]] == -1) game[num[j][i]] = j;
      else game[num[j][i]] = -2;
    }
    for(int j = 0;j < 101;j++){
      if(game[j] >= 0) pt[game[j]] += j;
    }
  }
  for(int i = 0;i < n;i++) cout << pt[i] << endl;
  return 0;
}