Description
Every year, 13 public school divisions in the Bicol region come together and celebrate sports through a region-wide sports competition called the Palarong Bicol. As you can probably imagine, there are many kinds of sports that are played, many of them are head-to-head. Since this is a competitive event, teams have to be matched up to play in this kind of event. One popular way of generating the matchup schedule of competitors in head-to-head games is called Round Robin. This scheme makes sure that each team gets to play with every other team at least once to give accurate standings at the end of the event and to give each team as many opportunities to exhibit their skill. Given that there are 13 teams, the task has become too difficult for the organizer to do on the spot (imagine if there were 5 teams, they would have to generate 10 matches, what more for 13!) so they would appreciate a computer program that would do it instantly.
Input Format
The input will begin with a line that contains the event name, followed by another line that contains numbers. The first number on this line is how many teams are competing in the event and the rest of the numbers that follow are the team numbers of the competitors, each separated by spaces. Note that there can be more than one event.
Output Format
The output should start with the string “Matchups for” followed by a space, then the event name. The following lines should display the matchups as follows: “team – team”. The team with the higher valued team number should always appear as the second of the pair and the list of matchups should be sorted according to the first team of each match pair. An empty line separates each event schedule.