Adding permute with swap and stack only.