Complex Spanning Tree | CodeChef