At Saber University where all students study fencing, there is a year long informal women versus men fencing
contest between members of the women's teams and those of the men's teams. Each contestant is given a randomly
chosen small number for anonymity, and from time to time a draw randomly determines the numbers of a woman and
a man who will fence to determine a winner. These events are private and known only to the two people engaged in
them and the judge. The overall outcome of the contest is considered just whether the women or the men have won
more times.
Your friend Amanda (contestant number 13) who is one of the contestants from one of the women's teams suspects
that the contest judge is fixing the results in favor of the men, and has managed to get a copy of the raw real
results from the judge's computer. Now Amanda wants you to determine which side, men or women, has really won this
year. Unfortunately, the spreadsheet she has a copy of contains only pairs of contestant numbers and a note of
which one won.
Write a program to read in the raw contest data in the following form, and determine, if possible, whether the
women won, the men won, there was a tie, or that it is not possible to determine which. The input will consist
of a number of lines, each beginning with a positive integer, then a tab character, then another positive integer
(and then a newline). Input ends with a blank line. Each line of input represents a pair of contestants who have
been drawn to fence during the last year, and the first number on the line represents the winner from that pair.
The output should be one of the following lines.
The Women won.
The Men won.
The teams tied.
Cannot determine who won.