add solution for generating parentheses.