Write a script to validate whether a given string of brackets (parentheses, curly braces, square brackets) is balanced.