You are given connected undirected graph with n vertices and m edges.
Let's say that mapping between edges and positive integers f(e) is good mapping if following conditions are true:
Your task is to find good mapping that maxe∈E(f(e)) is minimum as possible.
Input format
The first line contains three integers n and m (2≤n≤2⋅105, 1≤m≤2⋅105) — number of vertices and number of edges, respectively.
Then m lines follow.
The i-th of them contains integers ai and bi (1≤ai,bi≤n, ai≠bi) describing edge ei connecting ai and bi.
Output format
First line of output should contain single integer maxe∈E(f(e)) of your mapping f.
Then print m lines: the i-th of these lines should contain single integer f(ei).