import scala.math._

object Main {
  val sc = new java.util.Scanner(System.in)
  def main(args: Array[String]) {
    val n = sc.nextInt()
    val a = Array.ofDim[Int](3, n)
    for(i <- 0 until n; j <- 0 until 3) {
      a(j)(i) = sc.nextInt()
    }
    val p = (for(i <- 0 until 3) yield {
      val g = a(i).zipWithIndex.groupBy(x => x._1)
      (for(j <- 0 until n) yield {
        if(g(a(i)(j)).size == 1) {
          a(i)(j)
        } else {
          0
        }
      }).toArray
    }).toArray
    for(i <- 0 until n) {
      println(p(0)(i) + p(1)(i) + p(2)(i))
    }
  }
}