






"""simple docstring"""




from .stack import Stack





def 						__UpperCAmelCase      (					a_):
							snake_case_           =							Stack()
							snake_case_           =							{'(': ')', '[': ']', '{': '}'}
							for bracket in parentheses:
														if bracket in bracket_pairs:
																					stack.push(a_)
														elif bracket in (")", "]", "}"):
																					if stack.is_empty() or bracket_pairs[stack.pop()] != bracket:
																												return False
							return stack.is_empty()


if __name__ == "__main__":
	from doctest import testmod

	testmod()

	lowercase  							= ["((()))", "((())", "(()))"]
	print("Balanced parentheses demonstration:\n")
	for example in examples:
		lowercase  							= "" if balanced_parentheses(example) else "not "
		print(f'{example} is {not_str}balanced')













def 						__UpperCAmelCase      (					a_):
							return 1 if input_a == 0 else 0





def 						__UpperCAmelCase      (					):
							assert not_gate(0) == 1
							assert not_gate(1) == 0


if __name__ == "__main__":
	print(not_gate(0))
	print(not_gate(1))





