solution to Swap Nodes in Pairs