write post for swap nodes in pairs