DrawCode Practice Problem

Valid Parentheses

Given a string `s` of brackets `()[]{}`, determine if the input is valid.

Examples

Input

s = "()"

Output

true

Input

s = "(]"

Output

false

Constraints


Interactive Visualizer Workspace

Explore step-by-step interactive animations, memory state tracking, and live multi-language execution in DrawCode.

Launch Interactive Visualizer