There is a circuit board, the left side and the right side both have N points.
Now we need connect M lines between left point and right. As all we know, the connect line can't intersect, so we need divided the lines into different level, every level the lines are disjoint. Two lines connect one point is not intersect.
Now can you tell kk the minimum level required.
There are multiple tests.
each test first line contain two integer numbers N M(1<=N,M<=100000). next M lines, each line contain two integer x y(1<=x,y<=N), that mean left point x need connect right point y.