# Autogenerated with DRAKON Editor 1.31

def validBrackets(s):
    #item 6
    stack = []
    map = {")": "(", "}": "{", "]": "["}
    for char in s:
        #item 7
        if char in map:
            #item 39
            if stack:
                #item 42
                top_element = stack.pop()
            else:
                #item 43
                top_element = "#"
            #item 44
            if map[char] != top_element:
                #item 47
                return False
            else:
                pass
        else:
            #item 11
            stack.append(char)
    #item 18
    t = not stack
    return not stack

s1 = "({(((())))})"
print(validBrackets(s1))

# Autogenerated with DRAKON Editor 1.31

def validBrackets(s):
    #item 6
    stack = []
    map = {")": "(", "}": "{", "]": "["}
    for char in s:
        #item 7
        if char in map:
            #item 39
            if stack:
                #item 42
                top_element = stack.pop()
            else:
                #item 43
                top_element = "#"
            #item 44
            if map[char] != top_element:
                #item 47
                return False
            else:
                pass
        else:
            #item 11
            stack.append(char)
    #item 18
    t = not stack
    return not stack

s1 = "({(((())))})"
print(validBrackets(s1))

# Autogenerated with DRAKON Editor 1.31 #item 6 #item 7 #item 39 #item 42 #item 43 #item 44 #item 47 #item 11 #item 18