Magnetic Cushions
The City of the Future is built up with skyscrapers. To move between them and transport parking some of skyscrapers triples are connected with triangular cushions made from unipolar magnets. Each cushion connects exactly skyscrapers and a top view on it is a triangle with vertices in skyscrapers. This allows moving freely between the skyscrapers. The pillows can be constructed at different levels, so one skyscraper can be connected with different couples using different pillows, so two skyscrapers can be connected with multiple pillows (either with different third skyscrapers or with the same). For example, there may be two cushions at different levels between skyscrapers and and moreover, a magnetic cushion between and .
The system of magnetic pillows is organized so that you can use them to get from one skyscraper to any other in this city (from one pillow to another you can move inside a skyscraper), but maintaining each of them requires a lot of energy.
Write a program that finds which magnetic pillows can not be removed from the city structure, because removal of even just one of them leads to the fact that there exist skyscrapers from which now you can not get to some other skyscrapers, and people will become very sad.
Input
The first line contains two integers and — the number of skyscrapers in the city and the number of magnetic pillows correspondingly. In each of the next lines three integers are given — the numbers of skyscrapers, connected with a cushion. The skyscrapers are numbered with integers from to . It is guaranteed that the given magnetic cushions allow you to move from any skyscraper to any other.
Output
Print the number of magnetic pillows, which to turn off is impossible without breaking the connectivity in the city. If this number is non-zero, print in the next line their numbers. The numbers should correspond to the order in which the cushions are listed in the input. The numbering starts from one.