Finding the chains of friends after a valid swap.