


'''simple docstring'''







def        __lowercase						(      __SCREAMING_SNAKE_CASE		)				->					int:
     """simple docstring"""




     __a       =   [1]

     __a       =   0, 0, 0
     __a       =   ugly_nums[ia] * 2
     __a       =   ugly_nums[ia] * 3
     __a       =   ugly_nums[ia] * 5

     for _ in range(1				,  lowercase_		):
          __a       =   min(lowercase_				,  lowercase_				,  lowercase_		)
          ugly_nums.append(lowercase_		)
          if next_num == next_a:
               ia += 1
               __a       =   ugly_nums[ia] * 2
          if next_num == next_a:
               ia += 1
               __a       =   ugly_nums[ia] * 3
          if next_num == next_a:
               ia += 1
               __a       =   ugly_nums[ia] * 5
     return ugly_nums[-1]


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

 testmod(verbose=True)
 print(f"""{ugly_numbers(2_00) = }""")










'''simple docstring'''







def        __lowercase						(      __SCREAMING_SNAKE_CASE		)				->					Dict:
     """simple docstring"""




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

     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        __lowercase						(      )				->					List[str]:
     """simple docstring"""




     __a       =   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()






