Use sets union to solve problem #1