CF1916F Group Division

Description

In the $ 31 $ st lyceum, there were two groups of olympiad participants: computer science and mathematics. The number of computer scientists was $ n_1 $ , and the number of mathematicians was $ n_2 $ . It is not known for certain who belonged to which group, but it is known that there were friendly connections between some pairs of people (these connections could exist between a pair of people from the same group or from different groups). The connections were so strong that even if one person is removed along with all their friendly connections, any pair of people still remains acquainted either directly or through mutual friends. $ ^{\dagger} $ More formally, two people $ (x, y) $ are acquainted in the following case: there are people $ a_1, a_2, \ldots,a_n $ ( $ 1 \le a_i \le n_1 + n_2 $ ) such that the following conditions are simultaneously met: $ \bullet $ Person $ x $ is directly acquainted with $ a_1 $ . $ \bullet $ Person $ a_n $ is directly acquainted with $ y $ . $ \bullet $ Person $ a_i $ is directly acquainted with $ a_{i + 1} $ for any ( $ 1 \le i \le n - 1 $ ). The teachers were dissatisfied with the fact that computer scientists were friends with mathematicians and vice versa, so they decided to divide the students into two groups in such a way that the following two conditions are met: $ \bullet $ There were $ n_1 $ people in the computer science group, and $ n_2 $ people in the mathematics group. $ \bullet $ Any pair of computer scientists should be acquainted (acquaintance involving mutual friends, who must be from the same group as the people in the pair, is allowed), the same should be true for mathematicians. Help them solve this problem and find out who belongs to which group.

Input Format

N/A

Output Format

N/A

Explanation/Hint

Consider the third test case. The division into groups looks as follows: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1916F/61a6b120f4c32c6f1c36976b3b60c3a388509a79.png) The students selected as computer scientists are colored in green, and those selected as mathematicians are colored in blue.Consider all pairs of computer scientists and how they are acquainted: Pairs $ (4, 5), (4, 6) $ are directly acquainted. Pair $ (5, 6) $ is acquainted through the computer scientist with number $ 4 $ . Consider all pairs of mathematicians and how they are acquainted: Pairs $ (1, 2), (2, 3) $ are directly acquainted. Pair $ (1, 3) $ is acquainted through the mathematician with number $ 2 $ . We conclude that any pair of people belonging to the same group is acquainted with each other, thus the division into two groups is correct.