strs = ['accs','accss','acaa']
s = '[()]'

par = ['()', '[]', '{}']
stack = []
for i in s:
    if i == '(' or i == '[' or i == '{':
        stack.append(i)
    else:
        print(stack[0] + i)
        if stack[-1] + i in par:
            stack.pop()
            print(stack)
        else:
            print('false')
            break

if stack:
    print('False') 
print('done')


