Problem B - Joint Authors ------------------------- Scientists write papers and present them at conferences. Often, several scientists cooperate to write a paper (or article). Given a list of papers at a conference and their authors, we'd like to know who is the most productive scientist. The productivity is measured by a weighted total of the number of papers the scientist wrote. If k scientists collaborated on a paper, each is assigned a score of 1/k for that paper. A scientist's productivity is the total of all these scores. For example, if a scientist wrote 1 paper by himself and another paper in a team of 4 people, then his total score is 5/4. Input Format ------------ There will be several input instances. Each instance will begin with a number, p indicating how many papers appear in the list. This is followed by p lines, each describing a paper. These lines will begin with the number of authors of the paper, followed by a list of their last names. (Assume no two scientists at the conference have the same last name and that each last name is a single word.) The end of the input is indicated by a line with p=0. You can assume there will not be more than 1000 authors in any input instance. Output Format ------------- For each input instance, output the name of the scientist with the highest total score on a separate line. If there is a tie for the most productive scientist, just output "TIE" instead of a name. Sample Input ------------ 4 3 Turing Church Neumann 1 Turing 2 Church Neumann 1 Godel 4 2 Borodin Cook 1 Herlihy 2 Cook Ellen 3 Borodin Achlioptas Beame 0 Output for Sample Input ----------------------- Turing TIE