Sol-ARCH interview question

Find a valid parenthese as '()', '[]' and '{}' in a string?