c1 = c2 = 0 while True: s = input() if s == ".": break for i in s: if i == '(': c1 += 1 elif i == ')': c1 -= 1 elif i == '[': c2 += 1 elif i == ']': c2 -= 1 if c1 0: print("no") while True: s = input() #종료조건 if s == '.': break stack = [] check = True for i in s: if i == '(' or i == '[': stack.append(i) elif i == ')': if not stack or stack[-1] == '[': check = False break elif..