- Time limit: 1.00 s
- Memory limit: 512 MB
You are given a simple graph with nodes and 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 and : the number of nodes and edges. The nodes are numbered .
Then there are lines describing the edges. Each line has two integers and : there is an edge connecting nodes and .
Output
First, print an integer : the minimum number of colors.
After this, print integers : the colors of the nodes. The colors should satisfy .
You may print any valid solution.
Constraints
Example
Input:
4 4 1 2 2 3 3 4 4 1
Output:
2 1 2 1 2