CF1710D Recover the Tree

Description

Rhodoks has a tree with $ n $ vertices, but he doesn't remember its structure. The vertices are indexed from $ 1 $ to $ n $ . A segment $ [l,r] $ ( $ 1 \leq l \leq r \leq n $ ) is good if the vertices with indices $ l $ , $ l + 1 $ , ..., $ r $ form a connected component in Rhodoks' tree. Otherwise, it is bad. For example, if the tree is the one in the picture, then only the segment $ [3,4] $ is bad while all the other segments are good. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1710D/4fd7c832e9131d61a7e54d528e57f32ae63951c2.png)For each of the $ \frac{n(n+1)}{2} $ segments, Rhodoks remembers whether it is good or bad. Can you help him recover the tree? If there are multiple solutions, print any. It is guaranteed that the there is at least one tree satisfying Rhodoks' description.

Input Format

N/A

Output Format

N/A

Explanation/Hint

The first test case is explained in the statement. In the second test case, one possible tree is as follows: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1710D/5e8ee8c45791f0ab519d49ee3373b652d0c902bd.png)In the third test case, one possible tree is as follows: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1710D/e951e91b803c38b61a8bd56acc10554d42a981b3.png)