The first input line contains two space separated integers: n (1 ≤ n ≤ 105), representing the number of computers, and m (1 ≤ m ≤ 3×105), representing the total number of steps (each step being either
connect two computers or a query on the average connectivity as of that moment). Assume that the computers are numbered 1 throughn, inclusive.
Each of the following m input lines contains information about one operation, in the order that they occur. Each of these lines will start with a single integer, either 1 or 2, providing the step type. If the step type is 1, it means that a pair of computers is being connected with a direct connection. The value of 1 will be followed by u and v (1 ≤u, v ≤ n, u≠ v), representing the pair of computers being connected with a direct connection. If the step type is 2, this is a query and no other information will be on that input line.
Note: It’s possible that the input contains multiple direct connections for the same pair of computers; the extra direct connections between the same two computers do not have any effects. It’s also possible that, at the end of the process, not allncomputers are connected in the same component, i.e., there may be more than one component even at the end of the process.
For each query, output the average connectivity of the network at that point in time as a fraction in lowest terms on a line by itself. Specifically, output two integers,xandy, with the character ‘/’ in between, indicating that the average connectivity of the network at the time isxdivided byysuch thatxandyshare no common factors, e.g., 21/12 is not correct (should be 7/4).