zigzag & generating parentheses