you hear Foolland Geography lesson specifically know federal structure country centurie the country consist n city pair city connect bidirectional road road describe length liThe fool live land joyfully recent revolution change king now king Vasily Bear Vasily divide country city region city region path road city different region do not path then Vasily decide upgrade road network construct exactly p new road country construct road go like we choose pair distinct city u v connect new road possible road city we define length new road city u v belong distinct region length calculate min109S1 S total length road exist link region assume length equal 1000 we build road specify length choose city if new road connect distinct region construction road region combine new region Vasily want road construct process result country consist exactly q region your task come road construct plan Vasily meet requirement minimize total length build road