Mark found an old automaton with two buttons in his attic, which he used to play with as a child. The toy is quite rusty, but it still performs its function. When the first button is pressed, a single $$$0$$$ appears on the screen, and when the other button is pressed, either due to age or malfunction, the automaton outputs $$$k$$$ ones at once.
Mark became curious about how many different strings of lengths from $$$\ell$$$ to $$$r$$$ can be obtained if the automaton outputs $$$k$$$ ones when the second button is pressed. However, since the automaton is old and Mark's curiosity is great, you will have to answer $$$q$$$ queries instead of the automaton.
Since the answer to any of Mark's queries can be very large, compute it modulo $$$998244353$$$.
In the first line, you are given $$$2$$$ integers $$$n$$$ and $$$q$$$ ($$$1 \le n, q \le 2 \cdot 10^5$$$) — the maximum length of the string and the number of queries.
In the next $$$q$$$ lines, three integers $$$\ell_i, \ r_i, \ k_i$$$ are given ($$$1 \le \ell_i \le r_i \le n, 1 \le k \le n$$$) — the range of lengths and the number of ones that the automaton prints.
For each query, output the number of strings that the automaton can print modulo $$$998244353$$$.
| № | Add. Constraints | Points | Req. Groups | Comment | ||
| $$$n$$$ | $$$q$$$ | $$$k$$$ | ||||
| $$$0$$$ | — | — | — | — | — | Tests from the statement |
| $$$1$$$ | $$$n \le 15$$$ | $$$q \le 15$$$ | — | $$$7$$$ | $$$0$$$ | — |
| $$$2$$$ | $$$n \le 15$$$ | — | — | $$$9$$$ | $$$0 - 1$$$ | — |
| $$$3$$$ | $$$n \le 5000$$$ | $$$q \le 5000$$$ | — | $$$11$$$ | $$$0 -1$$$ | — |
| $$$4$$$ | $$$n \le 5000$$$ | — | — | $$$8$$$ | $$$0-3$$$ | — |
| $$$5$$$ | — | — | $$$k \le 20$$$ | $$$9$$$ | $$$0-2$$$ | — |
| $$$6$$$ | — | — | — | $$$12$$$ | — | $$$\ell_i = r_i = n$$$ |
| $$$7$$$ | — | — | $$$20 \cdot k \ge n$$$ | $$$13$$$ | — | — |
| $$$8$$$ | $$$n \le 50000$$$ | $$$q \le 50000$$$ | — | $$$21$$$ | $$$0, 1, 3$$$ | — |
| $$$9$$$ | — | — | — | $$$10$$$ | $$$0-8$$$ | — |
8 61 1 14 8 21 8 31 8 14 6 24 6 4
2 81 39 510 26 9
| Name |
|---|


