generate parentheses python accepted