A kingdom is under attack by ninjas. Because ninjas hide in the shadows and cannot be seen, they are extremely dangerous, and the whole kingdom has fallen except for the single castle where the king remains.
In front of the castle stand $N$ bushes in a row, numbered $1$ through $N$. Exactly $K$ ninjas are hidden, one each in $K$ distinct bushes.
The castle has $M$ guards. Guard $i$ watches the contiguous range of bushes from bush $A_i$ to bush $B_i$ and reports about that range as follows.
Call a placement of ninjas valid if it satisfies the reports of all guards simultaneously. If a bush contains a ninja in every valid placement without exception, we say that a ninja is certainly hidden in that bush.
Given each guard's watched range and report, write a program that finds every bush in which a ninja is certainly hidden.
The first line contains three integers $N$, $K$, and $M$ separated by spaces: the number of bushes, the number of hidden ninjas, and the number of guards.
Each of the next $M$ lines contains three integers $A_i$, $B_i$, and $C_i$ separated by spaces ($A_i \le B_i$), meaning that guard $i$ watches bushes $A_i$ through $B_i$ and that $C_i$ is the report for that range. $C_i$ is $0$ or $1$: $0$ means there is no ninja in the range, and $1$ means there is at least one ninja in the range.
$1 \le N \le 100,000$
$1 \le K \le N$
$1 \le M \le 100,000$
If at least one bush has a ninja certainly hidden in it, print the numbers of those bushes in ascending order, one per line. If there is no such bush, print $-1$.
Consider the first sample. There are $5$ bushes and $3$ ninjas, and the reports say: range $[1,2]$ has a ninja, range $[3,4]$ has a ninja, range $[4,4]$ has no ninja, and range $[4,5]$ has a ninja. Only two placements satisfy every report: ninjas at bushes ${1,3,5}$ or at bushes ${2,3,5}$. In both placements bushes $3$ and $5$ always hold a ninja, so they are printed. Bush $1$, on the other hand, holds a ninja in one placement but not the other, so it is not printed; bush $2$ is omitted for the same reason.