Generate Permutations Without Recursion