Permutations with parenthesis