The kingdom

No attempts yetTime limit1sMemory limit256 MB

Problem

Bytetoria has nn cities and an even number of bidirectional roads. The road network lets you travel between any two cities of the kingdom.

King Byte loves even numbers. When he learned that some cities have an odd number of roads leaving them, he ordered the network expanded at once.

The advisor knows the treasury well. A project of that size would make the Winter Olympic Games, which the people await, impossible to hold. He plans to convince the king that Bytetoria already has enough even properties, and to ask that the work wait until next year.

First he will surprise the king with the fact that the number of odd-degree cities is even. Then he will pair those cities and, for each pair (u,v)(u, v), choose a route from uu to vv that uses an even number of roads. A route does not use the same road twice. Distinct routes do not share a road. A route may visit the same city more than once.

The advisor is sure this will convince the king. He cannot pick the routes himself, so he asks you for help.

Input

The first line contains two integers nn and mm (2n,m2500002 \le n, m \le 250000). They are the number of cities and the number of roads. mm is even.

Each of the next mm lines contains two integers aa, bb (1a,bn1 \le a, b \le n, aba \ne b), meaning a bidirectional road between cities aa and bb. At most one road joins any pair of cities.

You may assume that at least one city has odd degree.

Output

Let kk be the number of odd-degree cities. kk is even.

If no set of routes matches the advisor's plan, print NIE on a single line.

Otherwise print k/2k/2 routes, uniquely determined as follows.

Build a depth-first spanning tree from city 11, always expanding the unused adjacent city of smallest index. Split each city xx into copies x0x_0 and x1x_1, and add a dummy city 00. Move each original road onto a pair of copies:

When the search at city xx sees a road to an already visited city yy whose visit time is smaller than that of xx, put that road between x1x_1 and y0y_0. After the subtree of a tree child cc of parent pp is finished, if the number of roads already incident to c1c_1 is odd, put the tree road between c1c_1 and p0p_0; if that number is even, put it between c0c_0 and p1p_1.

For every odd-degree city uu, add a dummy road between 00 and u0u_0. Find an Euler circuit of this new graph that starts at 00. Whenever several unused incident roads remain, take the one with the smallest original index. Dummy roads have index 1-1; if those tie, take the one whose other endpoint has the smaller city index.

Removing the dummy roads from the circuit leaves k/2k/2 even-length trails. Print them in circuit order.

Each route uses two lines. The first line has the start city uiu_i, the end city viv_i, and the number of roads lil_i, where lil_i is even. The second line has lil_i road indices in order along the route. Roads are numbered from 11 to mm in input order.