


'''simple docstring'''







from __future__ import annotations






def 			lowercase				(_A = 4					):







       """simple docstring"""







       _lowerCAmelCase    :							Union[str, Any]   			=       abs(_A					) or 4
       return [[1 + x + y * row_size for x in range(_A					)] for y in range(_A					)]






def 			lowercase				(_A					):







       """simple docstring"""







       return reverse_row(transpose(_A					)					)
       # OR.. transpose(reverse_column(matrix))






def 			lowercase				(_A					):







       """simple docstring"""







       return reverse_row(reverse_column(_A					)					)
       # OR.. reverse_column(reverse_row(matrix))






def 			lowercase				(_A					):







       """simple docstring"""







       return reverse_column(transpose(_A					)					)
       # OR.. transpose(reverse_row(matrix))






def 			lowercase				(_A					):







       """simple docstring"""







       _lowerCAmelCase    :							Union[str, Any]   			=       [list(_A					) for x in zip(*_A					)]
       return matrix






def 			lowercase				(_A					):







       """simple docstring"""







       _lowerCAmelCase    :							Union[str, Any]   			=       matrix[::-1]
       return matrix






def 			lowercase				(_A					):







       """simple docstring"""







       _lowerCAmelCase    :							Any   			=       [x[::-1] for x in matrix]
       return matrix






def 			lowercase				(_A					):







       """simple docstring"""







       for i in matrix:
              print(*_A					)


if __name__ == "__main__":
       lowerCAmelCase    :     Optional[Any]					=						make_matrix()
       print("""\norigin:\n""")
       print_matrix(matrix)
       print("""\nrotate 90 counterclockwise:\n""")
       print_matrix(rotate_aa(matrix))

       lowerCAmelCase    :     Any					=						make_matrix()
       print("""\norigin:\n""")
       print_matrix(matrix)
       print("""\nrotate 180:\n""")
       print_matrix(rotate_aaa(matrix))

       lowerCAmelCase    :     Tuple					=						make_matrix()
       print("""\norigin:\n""")
       print_matrix(matrix)
       print("""\nrotate 270 counterclockwise:\n""")
       print_matrix(rotate_aaa(matrix))





'''simple docstring'''







def 			lowercase				(_A					):







       """simple docstring"""







       _lowerCAmelCase    :							Dict   			=       len(_A					)
       while cur > 1:
              # Find the maximum number in arr
              _lowerCAmelCase    :							int   			=       arr.index(max(arr[0:cur]					)					)
              # Reverse from 0 to mi
              _lowerCAmelCase    :							Dict   			=       arr[mi::-1] + arr[mi + 1 : len(_A					)]
              # Reverse whole list
              _lowerCAmelCase    :							Optional[int]   			=       arr[cur - 1 :: -1] + arr[cur : len(_A					)]
              cur -= 1
       return arr


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

