def check_expression(exp):
    from collections import deque
    
    if len(exp) & 1:
        return False
    stack = deque()
    for ch in exp:
        if ch == '(' or ch == '{' or ch == '[':
            stack.append(ch)
        if ch == ')' or ch == '}' or ch == ']':
            if not stack:
                return False
            top = stack.pop()
            if (top == '(' and ch != ')') or (top == '{' and ch != '}' or (top == '[' and ch != ']')):
                return False
    return not stack
def check_expression(exp):
    from collections import deque
    if len(exp) & 1:
        return False
    stack = deque()
    for VAR_0 in exp:
        if VAR_0 == "(" or VAR_0 == "{" or VAR_0 == "[":
           
            stack.append(VAR_0)
        if VAR_0 == ")" or VAR_0 == "}" or VAR_0 == "]":
            if not stack:
                return False
            top = stack.pop()
            if (top == "(" and VAR_0 != ")") or (
                top == "{" and VAR_0 != "}" or (top == "[" and VAR_0 != "]")
            ):
                return False
    return not stack