

In a Rubrik cluster, there are N nodes. There are K wired connections between nodes where ith wired connection connects ai? and bi? nodes. Similarly, there are L wireless connections between nodes where ith wireless connection connects ci? and di? nodes. In each connection, nodes can communicate with each other. Each node determines the number of nodes it can communicate to both via wired connection and wireless connection. No two wired connections connect the same pair of nodes. Similarly, no two wireless connections connect the same pair of nodes. Under the constraints, it can be proven the process of consolidation will terminate. Find the final value to which N integers consolidate. Constraints: - 2?N?2×105 - 1?K,L?105 - 1?ai,bi?N,ai?=bi - 1?ci,di?N,ci?=di Input: The first line of the test case contains three space-separated integers N,K,L - denoting the number of nodes, wired connections, and wireless connections respectively. Next K lines contain K wired connections each containing two space-separated integers ai?bi?. Next L lines contain L wireless connections each containing two space-separated integers ci?di?. Output: the ith node by both wired and wireless routes. Sample Input
Output: the ith node by both wired and wireless routes. Sample Input 44?3?1? 12 23 34 23 Sample Output 1221 Sample Explanation All four nodes are connected to each other by a wired connection. Only the 2nd and 3rd nodes are connected by wireless connection. Thus, the answers for the cities are 1, 2, 2, and 1 respectively.