solution for problem of swap nodes in pairs