Make sure your answer array is sufficiently large because the worst case scenario that every "connection" includes only one point
喵~