URI Online Judge | 2365
# Brazilian Soccer' Big Bet

**Timelimit: 1**

By Alexandre Davis, UFMG Brazil

Many people will say that's just lucky, but Dilson have an incredible skill in win bets of soccer champioship. His last victory was won the computing bet of World Cup, including predicting the result of the Brazil x Germany and Spain x Netherlands match. Thinking in make himself a professional in bets, he ask you to create a program to compute the final rank of some bet.

In a bet, the competitors hit the scores of the soccer matches before the begin of the championship. After each match, they assign points to the competitors according with the following rules:

**10 points**- If the competitor hit the result (the team that won or lose) and the scores of each team.**7 points**- If the competitor hit the result and the scores of one team.**5 points**- If the competitor hit only the result**2 points**- If the competitor hit the scores of one team**0 points**- Otherwise

At end of the soccer championship, the competitor that scores more points is the champion. In this problem, you should output the final rank of the bet. The lexicographily order of the competitor name is the unique tiebreaker.

There are many test cases. The first line of each test case is composed by 2 integers **P** (1 ≤ **P** ≤ 10) and **N** (1 ≤ **N** ≤ 10) indicating, respectivelly, the number of the competitors in the bet and the number of the matches in the champioship. The next lines describe the competitor's hits.

The hit of **i**-th competitor are described in **N+1** lines. The first line has only one **S _{i}**, what is the name of competitor

Lastly, there are **N** lines describing the real results of the matches. Each line has **A _{j}**

The input ends with **P = N = 0**.

Input Sample | Output Sample |

3 4 |
Dilson 37 |

Dilson scores 10 + 10 + 7 + 10 = 37 points, Henrique scores 7 + 0 + 0 + 0 = 7 points and Filipe scores 5 + 0 + 0 + 2 = 7 points, but Filipe is up in rank than Henrique because of the tiebreak (lexicographic order of his names)