num = int(input()) l = [] w = [] for i in range(num): ll , ww = map(int, input().split()) l.append(ll) w.append(ww) s = list(input()) res = 0 while len(s) > 1: count = 0 for i in range(len(s)) : if s[i].isalpha(): count += 1 elif s[i] == ')': ...