import scala.io.StdIn.{readInt,readLine}

object Main {
  def main(args:Array[String]) = {
    val n = readInt
    val players = new Array[Int](n)
    val a = for(i <- 1 to n) yield readLine.split(" ").map(_.toInt)
    for(i<-0 until 3) {
      { for(j<-0 until n) yield (a(j)(i),j) }.toList.groupBy(_._1).filter(_._2.length==1).foreach { p=>
        players(p._2(0)._2) += p._1
      }
    }
    players.foreach(println)
  }
}