P27214 [AtCoder] Unique Number
普及+
题目描述

Problem Description

JOI has decided to play a game with his friends. There are $ N $ players participating in this game. The rules for one round of the game are as follows:

Each player writes down any integer between $ 1 $ and $ 100 $ (inclusive) on a card and submits it. Each player earns points equal to the number they wrote down if no one else wrote down the same number. If another player wrote down the same number, they do not earn any points.

JOI and his friends played this game three times. Given the numbers written by each player in the three games, create a program to calculate the total points earned by each player in the three games.


Input Format

The input consists of $ 1 + N $ lines.

The first line contains an integer $ N $ ($2 \leq N \leq 200$), representing the number of players.

The next $ N $ lines contain three integers each, separated by spaces, representing the numbers written by the $ i $-th player in the first, second, and third games, respectively. Each of these integers is between $ 1 $ and $ 100 $ (inclusive).

Output Format

The output consists of $ N $ lines.

The $ i $-th line ($1 \leq i \leq N$) should contain an integer representing the total points earned by the $ i $-th player in the three games.


Sample Input and Output

Sample Input #1

5
100 99 98
100 97 92
63 89 63
99 99 99
89 97 98

Sample Output #1

0
92
215
198
89

Sample Input #2

3
89 92 77
89 92 63
89 63 77

Sample Output #2

0
63
63

Notes/Hints

Sample Explanation 1

In the first sample input, the detailed points earned by each player in the three games are as follows: Player 1: $ 0 + 0 + 0 = 0 $ Player 2: $ 0 + 0 + 92 = 92 $ Player 3: $ 63 + 89 + 63 = 215 $ Player 4: $ 99 + 0 + 99 = 198 $ Player 5: $ 89 + 0 + 0 = 89 $ - - - - - -

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
5 100 99 98 100 97 92 63 89 63 99 99 99 89 97 98
样例输出
0 92 215 198 89