Xtreme Labs interview question

Implement an algorithm to print all permutation of valid parentheses.