solved [valid parentheses]