Create swap nodes in pairs.java