#C5849. Dessert Competition Winner Determination

    ID: 49543 Type: Default 1000ms 256MiB

Dessert Competition Winner Determination

Dessert Competition Winner Determination

In the annual dessert competition, each participant receives 12 weekly scores. The overall score for a participant is given by the sum of their weekly scores, i.e., \(S_i = \sum_{j=1}^{12} s_{ij}\), where \(s_{ij}\) is the score of the \(i\)-th participant in the \(j\)-th week.

Your task is to determine the winner(s). If multiple participants attain the highest overall score, output their names separated by a single space in the order they appear in the input.

inputFormat

The input is read from the standard input (stdin) with the following format:

  1. An integer \(N\) representing the number of participants.
  2. Next, \(N\) lines follow. Each line contains 12 space-separated integers denoting the weekly scores of a participant.
  3. The last line contains \(N\) names (strings) separated by spaces representing the participants' names.

outputFormat

Print a single line to the standard output (stdout) that contains the winner name(s) separated by a single space. If there are ties for the highest score, output all corresponding names in their original order.

## sample
3
7 8 9 4 5 6 9 8 4 5 7 6
5 6 8 9 7 6 7 8 9 4 6 8
8 9 7 4 6 5 8 9 6 7 5 4
Alice Bob Charlie
Bob

</p>