The input consists of several test cases and is terminated by end-of-file.
The first line of each test case contains two integers n and m.
The i-th of the following m lines contains 3 integers,
and
which denote the edge between vertices
and
with weight
.
For each test case, print (n - 1) integers which denote.
*
*
*
*
* The number of test cases does not exceed 100.
* The number of test cases with n > 8 does not exceed 5.