Publishing.com interview question

Simple coding task "correct bracket sequence"