Calvinball championship, again

No attempts yetTime limit1sMemory limit256 MB

Problem

The Calvinball championship is held again this year. A game is played by nn players with distinct names. Every player belongs to exactly one team, and no team is empty. Some players dislike each other. Disliking is symmetric: if player aa dislikes player bb, then bb dislikes aa.

The organizers changed the rule for forming teams. Two players who dislike each other may not be on the same team, and subject to that, 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 each other pairwise and need three different teams. Four teams are not an answer either, since three teams are possible and the number of teams has to be smallest.

Several divisions can satisfy the rule, so exactly one of them is asked for. Number the teams 11 through tt and let cic_i be the number of the team that player ii belongs to. Among all divisions into the smallest number of teams and all ways of numbering those teams, the answer is the one whose sequence (c1,c2,,cn)(c_1, c_2, \dots, c_n) is lexicographically smallest. A sequence AA comes before a sequence BB lexicographically if AA holds the smaller value at the first position where the two differ. Under this rule player 11 always belongs to 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 through 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, aibia_i \ne b_i), meaning that players aia_i and bib_i dislike each other. The same pair is never given twice, in either order.

Output

Print the smallest possible number of teams tt on the first line. Then print tt lines, where line ii contains the numbers of the players on team ii in increasing order, separated by single spaces. The team numbering must follow the lexicographically smallest rule stated above.