Calvinball championship team split

No attempts yetTime limit7sMemory limit512 MB

Problem

The Calvinball championship is held in Czech Republic this year. A game is played by nn players with distinct names, and the players are divided into teams. No team may be empty, and every player belongs to exactly one team.

Some pairs of players dislike each other. Disliking is symmetric: if player aa dislikes player bb, then bb dislikes aa.

The International Calvinball Disorganization changed the team selection rule at the last minute. Two players who dislike each other may not share a team, and among all divisions that obey this, the number of teams must be as small as possible.

For example, suppose Calvin, Hobbes, Susie, Tom, Jerry and Batman play, Batman dislikes the other five, and Tom dislikes Jerry and Hobbes. Three teams are enough: Batman alone, Tom with Susie, and Calvin with Hobbes and Jerry. Two teams are not enough, because Batman, Tom and Jerry dislike one another and need three different teams. Four teams is not the answer either, because three teams already work.

Several divisions into the minimum number of teams may exist, so the answer is fixed as follows. Let cic_i be the number of the team that player ii belongs to. Print the division whose sequence (c1,c2,,cn)(c_1, c_2, \dots, c_n) is lexicographically smallest, using team numbers 11 to tt. Under that rule the teams come out ordered by their smallest member, and player 11 is always in team 11.

Input

The first line contains the number of players nn and the number of disliking pairs mm. (1n161 \le n \le 16, 0mn(n1)/20 \le m \le n(n-1)/2) The players are numbered 11 to nn.

Each of the next mm lines contains two different integers aia_i and bib_i. (1ai,bin1 \le a_i, b_i \le n) It means players aia_i and bib_i dislike each other. The same pair is never given twice.

Output

Print the smallest possible number of teams tt on the first line. On each of the next tt lines, print the numbers of the players in team ii in increasing order, separated by single spaces.

Number the teams so that the sequence (c1,c2,,cn)(c_1, c_2, \dots, c_n) is lexicographically smallest, where cic_i is the number of the team holding player ii. That rule makes the answer unique.