Quest
During the LKS-2017 quest, the instructors presented the students with a challenge. Each of the n instructors had a number in mind. A student could approach two instructors and inquire about their numbers. In response, the instructors would reveal the greatest common divisor (GCD) of the numbers they had thought of.
The students asked about m pairs of instructors. Your task is to help the students deduce the numbers that the instructors were thinking of.
Input
The first line of the input contains two integers: n and m (2 ≤ n ≤ 10, 0 ≤ m ≤ 45). The following m lines each contain three integers: i, j, and d. This triplet indicates that the greatest common divisor of the numbers thought of by the i-th and j-th instructors is d (1 ≤ d ≤ 100). For each pair of i and j, there is at most one d provided. The instructors are numbered from 1 to n.
Output
If there is no possible solution, output the word impossible. Otherwise, output n integers representing the numbers thought of by the instructors. Each number must be positive and not exceed 10^18. If multiple solutions exist, you may output any one of them.