solved [generate parentheses]