You are given a graph of cities and roads. Each road has a repair cost. Find the minimum cost to repair roads so all cities are connected. If it is impossible, output "IMPOSSIBLE". This is a classic MST problem with a validation twist. You need to check if the graph is connected after building the MST. If you cannot connect all cities, the answer is impossible.
The problem tests both MST construction and connectivity validation.