Ezvor

7. Valid Parentheses

EasyStack Verified judge

Given a string s containing just the characters ()[]{}, determine if the input string is valid. Brackets must close in the correct order and every closing bracket has a matching opener.

Example 1

Input

()[]{}

Output

true

Example 2

Input

(]

Output

false

Input format

Input: one line with the bracket string `s`.
Output: `true` or `false`.

Constraints

  • 1 ≤ s.length ≤ 10^4
  • s consists of only the characters ()[]{}

Expected output

true