Andrey Smit is preparing problems for a team olympiad. One of the problems is based on Dijkstra's algorithm, and A.S. wants to prepare a hard test for this algorithm.
Dijkstra's algorithm works as follows. Let G be a directed graph with vertex set V, edge set E, and weight function \textbf{w : E} \to \mathbf{R}^{+}. Assume all vertices are reachable from vertex s. The algorithm uses a set of vertices U, initially empty. Each vertex is marked by either an integer or by . Initially, all vertices are marked with , and vertex s is marked with . Denote the label of vertex v as d_v.

A step of the algorithm is as follows: choose a vertex not in U with the minimal label. Let this vertex be u. Add u to U, and relax each edge uv \in \textbf{E}. Relaxation replaces d_v with \min(d_v, d_u + w(uv)). The algorithm ends when all vertices are added to U. If the label of vertex v changes, the relaxation is called active.
Now, Andrey Smit wants to build a graph with vertices and edges such that Dijkstra's algorithm performs the maximum possible number of active relaxations. Help him construct such a graph. To avoid non-determinism, assume that at every step there is exactly one vertex not in U with the minimal label.
The first line contains two integers: and — the number of vertices and edges in the graph Andrey wants to construct (4 \leq N \leq 1000,\ N-1 \leq M \leq \dfrac{N^2}{5}).
Output lines — the edges of the graph. Each line must contain three integers: the beginning of the edge, the end of the edge, and the weight of the edge. All weights must be non-negative and not exceed 10^6. All vertices must be reachable from vertex .
If Dijkstra's algorithm starts from vertex s=1, it must perform the maximum possible number of active relaxations among all graphs with vertices and edges. The graph must not contain loops or multiple edges.
Example 1
Example 2