You are in charge of designing a campus network connecting several buildings, and you care about both its reliability and its cost. To add redundancy while keeping the price as low as possible, you want to build the cheapest network such that, if any single line breaks, all buildings can still communicate with one another. Such a network is called a minimal reliable net.
There are multiple test cases. Each test case begins with a line containing two integers $n$ ($n \le 15$) and $m$ ($m \le 20$): the number of buildings (numbered $1$ through $n$) and the number of potential inter-building connections. (A line with $n = m = 0$ marks the end of input.) Each of the next $m$ lines contains three positive integers b1 b2 c, meaning it costs $c$ to connect buildings b1 and b2. All connections are bidirectional.
For each test case, print one line. If a minimal reliable net exists, print
The minimal cost for test case p is c.
where $p$ is the test case number (starting at $1$) and $c$ is the minimal total cost. If no reliable net is possible, print
There is no reliable net possible for test case p.