CSES - Graph Coloring
  • Time limit: 1.00 s
  • Memory limit: 512 MB

You are given a simple graph with nn nodes and mm edges. Your task is to use the minimum possible number of colors to color each node such that no edge connects two nodes of the same color.

Input

The first line has two integers nn and mm: the number of nodes and edges. The nodes are numbered 1,2,,n1, 2,\dots, n.

Then there are mm lines describing the edges. Each line has two integers aa and bb: there is an edge connecting nodes aa and bb.

Output

First, print an integer kk: the minimum number of colors.

After this, print nn integers c1,c2,,cnc_1, c_2,\dots, c_n: the colors of the nodes. The colors should satisfy 1cik1 \le c_i \le k.

You may print any valid solution.

Constraints

  • 1n161 \le n \le 16
  • 0mn(n1)20 \le m \le \frac{n(n-1)}{2}

Example

Input:

4 4
1 2
2 3
3 4
4 1

Output:

2
1 2 1 2