In test cases worth 30% of total points, it will hold 1 ≤ N
≤ 10 and 1 ≤ M
≤ N
·N
.
In test cases worth an additional 20% of total points, for each two connected spots, there will
exist a unique path between them. In other words, the graph will be a forest.
Clarification of the second test case:
Starting from the first peak, Slavko can choose to go to the first valley, so Slavko wins.
Starting from the second peak, Slavko can choose to go to the second valley, after which Mirko wins
by choosing to go to the fourth peak.
Starting from the third peak, there are no trails, so Mirko wins.
Starting from the fourth peak, Slavko must choose to go to the second valley, after which Mirko wins
by choosing the second peak.