Pregunta de entrevista de Comeet

Write a code for finding properly closed brackets.