#t489. 奥运奖牌计数

奥运奖牌计数

Counting Olympic Medals

Problem Description

At the 2008 Beijing Olympics, the athletes of country A participated in the finals over nn days (1≤n≤17)(1≤n≤17). Now we want to tally the number of gold, silver and bronze medals won by country A, as well as the total number of medals.

Input Format

The input has n+1n+1 lines. The first line is nn, the number of days country A participated in the finals. The following nn lines each give, for that day, the numbers of gold, silver and bronze medals won, separated by a space.

Output Format

Output one line with 44 integers: the total numbers of gold, silver and bronze medals won by country A, and the total number of medals, separated by a space.

Sample Input

3
1 0 3
3 1 0
0 3 0

Sample Output

4 4 3 11