Calvinball team division

No attempts yetTime limit1sMemory limit256 MB

Problem

nn players enter a Calvinball championship. The players are numbered 11 through nn, and every player joins exactly one non-empty team. There is no limit on the number of teams.

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

The organizers changed the team selection rule. Two players who dislike each other must not share a team, and among all divisions that respect this, the number of teams must be as small as possible.

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 impossible, because Batman, Tom and Jerry dislike each other, so the three of them need three different teams. Four teams is not the answer either, because a division into fewer teams exists.

Given who dislikes whom, divide the players into teams.

Input

The first line contains the number of players nn and the number of disliking pairs mm, separated by a space. (0n140 \le n \le 14, 0mn(n1)/20 \le m \le n(n-1)/2)

Each of the next mm lines contains two different integers aia_i and bib_i (1ai,bin1 \le a_i, b_i \le n, aibia_i \ne b_i), meaning that players aia_i and bib_i dislike each other. No pair is given twice.

Output

Print the smallest possible number of teams tt on the first line.

The teams are numbered 11 through tt. On the ii-th of the next tt lines print the numbers of the players on team ii in increasing order, separated by single spaces.

Several divisions can use tt teams, so print the one picked by this rule. 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, \ldots, c_n) is lexicographically smallest. That is, keeping the number of teams at the minimum tt, make c1c_1 as small as possible, then c2c_2 as small as possible, and so on. Exactly one division satisfies this rule.

If n=0n = 0, print 00 on the first line and nothing else.