Expedia Group Interview Question

Write a program to accept well-bracketed sequences of characters.