Farmer John’s cows are showing off their new dance mooves!
At first, all N cows (2≤N≤105) stand in a line with cow i in the ith position in line. The sequence of dance mooves is given by K (1≤K≤2⋅105) pairs of positions (a_1,b_1),(a_2,b_2),…,(a_K,b_K). In each minute i=1…K of the dance, the cows in positions a_i and b_i in line swap. The same K swaps happen again in minutes K+1…2K, again in minutes 2K+1…3K, and so on, continuing indefinitely in a cyclic fashion. In other words,
For each cow, please determine the number of unique positions in the line she will ever occupy.
The first line contains integers N and K. Each of the next K lines contains (a_1,b_1)…(a_K,b_K) (1≤a_i\<b_i≤N).
Print N lines of output, where the ith line contains the number of unique positions that cow i reaches.