Google Interview Question

How do you sort a group of unsorted parenthesis like ()))(()(