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