SplashLearn interview question

Write a program to check parenthesis are right.