CF1278E Tests for problem D

Description

We had a really tough time generating tests for problem D. In order to prepare strong tests, we had to solve the following problem. Given an undirected labeled tree consisting of $ n $ vertices, find a set of segments such that: 1. both endpoints of each segment are integers from $ 1 $ to $ 2n $ , and each integer from $ 1 $ to $ 2n $ should appear as an endpoint of exactly one segment; 2. all segments are non-degenerate; 3. for each pair $ (i, j) $ such that $ i \ne j $ , $ i \in [1, n] $ and $ j \in [1, n] $ , the vertices $ i $ and $ j $ are connected with an edge if and only if the segments $ i $ and $ j $ intersect, but neither segment $ i $ is fully contained in segment $ j $ , nor segment $ j $ is fully contained in segment $ i $ . Can you solve this problem too?

Input Format

N/A

Output Format

N/A