Solve the 'Surrounded Regions' problem