

'''simple docstring'''



from __future__ import annotations

from collections.abc import Generator







def      a__ (						a__		):




     """simple docstring"""


     if not isinstance(a__   ,					a__		) or n < 1:
          raise Exception("""Sequence only defined for positive integers"""		)

     yield n
     while n != 1:
          if n % 2 == 0:
               n //= 2
          else:
               __SCREAMING_SNAKE_CASE						     =   3 * n + 1
          yield n







def      a__ (						):




     """simple docstring"""


     __SCREAMING_SNAKE_CASE						     =   43
     __SCREAMING_SNAKE_CASE						     =   tuple(collatz_sequence(a__		)		)
     print(a__		)
     print(F'Collatz sequence from {n} took {len(a__		)} steps.'		)


if __name__ == "__main__":
  main()









'''simple docstring'''



def      a__ (						):




     """simple docstring"""


     __SCREAMING_SNAKE_CASE						     =   1

     while True:
          if (
              sorted(str(a__		)		)
              == sorted(str(2 * i		)		)
              == sorted(str(3 * i		)		)
              == sorted(str(4 * i		)		)
              == sorted(str(5 * i		)		)
              == sorted(str(6 * i		)		)
          ):
               return i

          i += 1


if __name__ == "__main__":
  print(solution())






