Question d’entretien chez Comeet

Write a code for finding properly closed brackets.