Find an array consisting of positive integers (also known as natural numbers) that meets specified constraints:
Here, denotes the greatest common divisor.
The first line contains two integers, and (1 \leq n, m \leq 150\,000).
Each of the following lines contains three integers: l_i, r_i, and x_i (1 \leq l_i \leq r_i \leq n, 1 \leq x_i \leq 16).
If such an array exists, output integers a_1, a_2, \dots, a_n (1 \leq a_i \leq 10^9).
If no such array can be constructed, output .
Example 1
Example 2
( points): n, m \leq 2\,000; x_i \leq 2;
( points): n, m \leq 2\,000;
( points): no additional constraints.