## main

n = gets.strip.to_i

pls = []
n.times do
  pls << gets.strip.split(' ').map{|s| s.to_i}
end

scores = n.times.map{0}

for i in (0..2)
  cards = 101.times.map{0}

  for j in (0...n)
    cards[pls[j][i]] += 1
  end

  for j in (0...n)
    if cards[pls[j][i]] == 1
      scores[j] += pls[j][i]
    end
  end
end

puts scores