Swap two nodes in pairs.