#K69842. Balanced Brackets

    ID: 33176 Type: Default 1000ms 256MiB

Balanced Brackets

Balanced Brackets

Given a string that consists solely of the characters '(', ')', '{', '}', '[' and ']', your task is to determine whether the string is balanced. A string is considered balanced if each opening bracket has a corresponding closing bracket in the correct order.

For example, the string \( () \) is balanced, while the string \( ([)] \) is not. Use appropriate algorithms to check the balance of the brackets.

inputFormat

The input is read from standard input (stdin) as a single line string containing only the characters '(', ')', '{', '}', '[' and ']'. The string may be empty.

outputFormat

Output a single line to standard output (stdout): print "True" if the string contains balanced brackets, otherwise print "False".

## sample
()
True