


"""simple docstring"""




def       a_ (	lowercase__ :Optional[int]     ):
			__lowerCamelCase          =      []
			__lowerCamelCase          =      set({"""(""", """[""", """{"""}     )
			__lowerCamelCase          =      set({""")""", """]""", """}"""}     )
			__lowerCamelCase          =      {"""{""": """}""", """[""": """]""", """(""": """)"""}

			for i in range(len(lowercase__     )     ):
						if s[i] in open_brackets:
									stack.append(s[i]     )

						elif s[i] in closed_brackets and (
						    len(lowercase__     ) == 0 or (len(lowercase__     ) > 0 and open_to_closed[stack.pop()] != s[i])
						):
									return False

			return len(lowercase__     ) == 0





def       a_ (	):
			__lowerCamelCase          =      input("""Enter sequence of brackets: """     )
			if is_balanced(lowercase__     ):
						print(lowercase__,			"""is balanced"""     )
			else:
						print(lowercase__,			"""is not balanced"""     )


if __name__ == "__main__":
					main()








"""simple docstring"""




def       a_ (	lowercase__ :str,			lowercase__ :int     ):
			return [sentence[i : i + ngram_size] for i in range(len(lowercase__     ) - ngram_size + 1     )]


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

					testmod()




