Introduction - If you have any usage issues, please Google them yourself
description
Traveling Salesman Problem
There are a variety of goods on the market, short-term trading TSP Shrek do make the difference. He bought a piece of merchandise the city, arriving at a neighboring city to sell. If this is a profitable business, then he would not just leave. With their years of experience and his companions, he was well aware of the difference between n cities on the map. There may be a variety of goods between the two cities can make the difference, when Shrek had the biggest profit reselling a commodity.
Now you help Shrek planning a route, so that he can earn the most money.
enter
The first line of two integers n, m. He expressed n cities, numbered 1 ~ n
Then there are m rows, each row of three integers a, b, price, expressed a city to city b can make the difference price.
Export
Several Tab separated integers, and even into a most profitable routes. If multiple output lexicographically smallest that route (a small number of priority urban