dp: generate parenthesises