





"""simple docstring"""





def 			UpperCAmelCase__							(  SCREAMING_SNAKE_CASE     :						List[str]			):







      '''simple docstring'''




      lowerCAmelCase  						=       []
      lowerCAmelCase  						=       set({"""(""", """[""", """{"""}			)
      lowerCAmelCase  						=       set({""")""", """]""", """}"""}			)
      lowerCAmelCase  						=       {"""{""": """}""", """[""": """]""", """(""": """)"""}

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

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

      return len(SCREAMING_SNAKE_CASE			) == 0


def 			UpperCAmelCase__							(  ):







      '''simple docstring'''




      lowerCAmelCase  						=       input("""Enter sequence of brackets: """			)
      if is_balanced(SCREAMING_SNAKE_CASE			):
            print(SCREAMING_SNAKE_CASE							,						"""is balanced"""			)
      else:
            print(SCREAMING_SNAKE_CASE							,						"""is not balanced"""			)


if __name__ == "__main__":
       main()













"""simple docstring"""





def 			UpperCAmelCase__							(  SCREAMING_SNAKE_CASE     :						int							,						SCREAMING_SNAKE_CASE     :						int			):







      '''simple docstring'''




      while b:
            lowerCAmelCase						,		lowerCAmelCase  						=       b, a % b
      return a


def 			UpperCAmelCase__							(  SCREAMING_SNAKE_CASE     :						int							,						SCREAMING_SNAKE_CASE     :						int			):







      '''simple docstring'''




      return a if b == 0 else euclidean_gcd_recursive(SCREAMING_SNAKE_CASE							,						a % b			)


def 			UpperCAmelCase__							(  ):







      '''simple docstring'''




      print(F'euclidean_gcd(3, 5) = {euclidean_gcd(3							,						5			)}'			)
      print(F'euclidean_gcd(5, 3) = {euclidean_gcd(5							,						3			)}'			)
      print(F'euclidean_gcd(1, 3) = {euclidean_gcd(1							,						3			)}'			)
      print(F'euclidean_gcd(3, 6) = {euclidean_gcd(3							,						6			)}'			)
      print(F'euclidean_gcd(6, 3) = {euclidean_gcd(6							,						3			)}'			)

      print(F'euclidean_gcd_recursive(3, 5) = {euclidean_gcd_recursive(3							,						5			)}'			)
      print(F'euclidean_gcd_recursive(5, 3) = {euclidean_gcd_recursive(5							,						3			)}'			)
      print(F'euclidean_gcd_recursive(1, 3) = {euclidean_gcd_recursive(1							,						3			)}'			)
      print(F'euclidean_gcd_recursive(3, 6) = {euclidean_gcd_recursive(3							,						6			)}'			)
      print(F'euclidean_gcd_recursive(6, 3) = {euclidean_gcd_recursive(6							,						3			)}'			)


if __name__ == "__main__":
       main()






