hr connecting-towns

https://www.hackerrank.com/challenges/connecting-towns