



"""simple docstring"""


def        lowercase		(					_SCREAMING_SNAKE_CASE      :  str    ,   _SCREAMING_SNAKE_CASE      :  int ):






				'''simple docstring'''



				_UpperCAmelCase							=			[[] for _ in range(__SCREAMING_SNAKE_CASE )]
				_UpperCAmelCase							=			key - 1

				if key <= 0:
								raise ValueError('''Height of grid can\'t be 0 or negative''' )
				if key == 1 or len(__SCREAMING_SNAKE_CASE ) <= key:
								return input_string

				for position, character in enumerate(__SCREAMING_SNAKE_CASE ):
								_UpperCAmelCase							=			position % (lowest * 2)  # puts it in bounds
								_UpperCAmelCase							=			min(__SCREAMING_SNAKE_CASE    ,   lowest * 2 - num )  # creates zigzag pattern
								temp_grid[num].append(__SCREAMING_SNAKE_CASE )
				_UpperCAmelCase							=			[''.join(__SCREAMING_SNAKE_CASE ) for row in temp_grid]
				_UpperCAmelCase							=			''.join(__SCREAMING_SNAKE_CASE )

				return output_string







def        lowercase		(					_SCREAMING_SNAKE_CASE      :  str    ,   _SCREAMING_SNAKE_CASE      :  int ):






				'''simple docstring'''



				_UpperCAmelCase							=			[]
				_UpperCAmelCase							=			key - 1

				if key <= 0:
								raise ValueError('''Height of grid can\'t be 0 or negative''' )
				if key == 1:
								return input_string

				_UpperCAmelCase							=			[[] for _ in range(__SCREAMING_SNAKE_CASE )]  # generates template
				for position in range(len(__SCREAMING_SNAKE_CASE ) ):
								_UpperCAmelCase							=			position % (lowest * 2)  # puts it in bounds
								_UpperCAmelCase							=			min(__SCREAMING_SNAKE_CASE    ,   lowest * 2 - num )  # creates zigzag pattern
								temp_grid[num].append('''*''' )

				_UpperCAmelCase							=			0
				for row in temp_grid:  # fills in the characters
								_UpperCAmelCase							=			input_string[counter : counter + len(__SCREAMING_SNAKE_CASE )]
								grid.append(list(__SCREAMING_SNAKE_CASE ) )
								counter += len(__SCREAMING_SNAKE_CASE )

				_UpperCAmelCase							=			''  # reads as zigzag
				for position in range(len(__SCREAMING_SNAKE_CASE ) ):
								_UpperCAmelCase							=			position % (lowest * 2)  # puts it in bounds
								_UpperCAmelCase							=			min(__SCREAMING_SNAKE_CASE    ,   lowest * 2 - num )  # creates zigzag pattern
								output_string += grid[num][0]
								grid[num].pop(0 )
				return output_string







def        lowercase		(					_SCREAMING_SNAKE_CASE      :  str ):






				'''simple docstring'''



				_UpperCAmelCase							=			{}
				for key_guess in range(1    ,   len(__SCREAMING_SNAKE_CASE ) ):  # tries every key
								_UpperCAmelCase							=			decrypt(__SCREAMING_SNAKE_CASE    ,   __SCREAMING_SNAKE_CASE )
				return results


if __name__ == "__main__":
					import doctest

					doctest.testmod()




"""simple docstring"""







def 			lowercase__(       __SCREAMING_SNAKE_CASE							:     list      ):

     if len(__SCREAMING_SNAKE_CASE      ) < 2:
          return collection

     def circle_sort_util(__SCREAMING_SNAKE_CASE							:     list     ,			__SCREAMING_SNAKE_CASE							:     int     ,			__SCREAMING_SNAKE_CASE							:     int      ) -> bool:
          lowercase_	:				Any													=	False

          if low == high:
               return swapped

          lowercase_	:				str													=	low
          lowercase_	:				int													=	high

          while left < right:
               if collection[left] > collection[right]:
                    lowercase_							,  lowercase_	:				Optional[Any]													=	(
                        collection[right],
                        collection[left],
                    )
                    lowercase_	:				Tuple													=	True

               left += 1
               right -= 1

          if left == right and collection[left] > collection[right + 1]:
               lowercase_							,  lowercase_	:				Dict													=	(
                   collection[right + 1],
                   collection[left],
               )

               lowercase_	:				str													=	True

          lowercase_	:				Optional[Any]													=	low + int((high - low) / 2      )
          lowercase_	:				str													=	circle_sort_util(__SCREAMING_SNAKE_CASE     ,			__SCREAMING_SNAKE_CASE     ,			__SCREAMING_SNAKE_CASE      )
          lowercase_	:				List[Any]													=	circle_sort_util(__SCREAMING_SNAKE_CASE     ,			mid + 1     ,			__SCREAMING_SNAKE_CASE      )

          return swapped or left_swap or right_swap

     lowercase_	:				Dict													=	True

     while is_not_sorted is True:
          lowercase_	:				Optional[Any]													=	circle_sort_util(__SCREAMING_SNAKE_CASE     ,			0     ,			len(__SCREAMING_SNAKE_CASE      ) - 1      )

     return collection


if __name__ == "__main__":
       __SCREAMING_SNAKE_CASE    	=input("Enter numbers separated by a comma:\n").strip()
       __SCREAMING_SNAKE_CASE    	=[int(item) for item in user_input.split(",")]
       print(circle_sort(unsorted))

