Find the matching pairs with as few turns as possible