Inverse Range Minimum Query
Inverse problems represent a quickly growing area in computer science. Unlike traditional problems, where given some data D, the task is to solve some optimization or calculation problem P, in the inverse problem you are given a problem P and the result R of the optimization/calculation. You have to restore the original data D. In this problem you are asked to solve inverse range minimum query problem.
Consider an array a[1..n]. The answer to a range minimum query Q(i, j) is the minimal value among a[i], ..., a[j]. You are given n and a series of range minimum queries with answers. Restore the original array a.
Input
The first line of the input file contains n - the size of the array, and m - the number of queries (1 ≤ n, m ≤ 100000). The following m lines contain three integer numbers each: numbers i, j and q mean that Q(i, j) = q (1 ≤ i ≤ j ≤ n,-2^31 ≤ q ≤ 2^31-1).
Output
If data in the input file is inconsistent, i.e. no such array a exists, output "inconsistent" at the first line of the output file.
In the other case output "consistent" at the first line of the output file. The second line must contain the array. The elements of the array must be integers between -2^31 and 2^31-1. If there are several solutions, output any one.