Bentley Systems Interview Question

Make a program that matches opened and closed brackets.