import sys




def        lowerCAmelCase_			(					__A							)					->    str:







      '''simple docstring'''


      UpperCAmelCase__								=  len(__A							)
      UpperCAmelCase__								=  [[0 for x in range(__A							)] for x in range(__A							)]
      UpperCAmelCase__								=  [[0 for x in range(__A							)] for x in range(__A							)]

      for chain_length in range(2,  __A							):
            for a in range(1,  n - chain_length + 1							):
                  UpperCAmelCase__								=  a + chain_length - 1

                  UpperCAmelCase__								=  sys.maxsize
                  for c in range(__A,  __A							):
                        UpperCAmelCase__								=  (
                            matrix[a][c] + matrix[c + 1][b] + array[a - 1] * array[c] * array[b]
                        )
                        if cost < matrix[a][b]:
                              UpperCAmelCase__								=  cost
                              UpperCAmelCase__								=  c
      return matrix, sol




def        lowerCAmelCase_			(					__A,  __A,  __A							)					->    Any:







      '''simple docstring'''


      if i == j:
            print("A" + str(__A							),  end=" "							)
      else:
            print("(",  end=" "							)
            print_optiomal_solution(__A,  __A,  optimal_solution[i][j]							)
            print_optiomal_solution(__A,  optimal_solution[i][j] + 1,  __A							)
            print(")",  end=" "							)




def        lowerCAmelCase_			(					)					->    str:







      '''simple docstring'''


      UpperCAmelCase__								=  [30, 35, 15, 5, 10, 20, 25]
      UpperCAmelCase__								=  len(__A							)
      # Size of matrix created from above array will be
      # 30*35 35*15 15*5 5*10 10*20 20*25
      UpperCAmelCase__		,				UpperCAmelCase__								=  matrix_chain_order(__A							)

      print("No. of Operation required: " + str(matrix[1][n - 1]							)							)
      print_optiomal_solution(__A,  1,  n - 1							)


if __name__ == "__main__":
      main()




from __future__ import annotations




def        lowerCAmelCase_			(					__A							)					->    list[int]:







      '''simple docstring'''


      if len(__A							) == 0:
            return array

      UpperCAmelCase__		,				UpperCAmelCase__								=  min(__A							), max(__A							)

      # Compute the variables
      UpperCAmelCase__								=  _max - _min + 1
      UpperCAmelCase__		,				UpperCAmelCase__								=  [0] * holes_range, [0] * holes_range

      # Make the sorting.
      for i in array:
            UpperCAmelCase__								=  i - _min
            UpperCAmelCase__								=  i
            holes_repeat[index] += 1

      # Makes the array back by replacing the numbers.
      UpperCAmelCase__								=  0
      for i in range(__A							):
            while holes_repeat[i] > 0:
                  UpperCAmelCase__								=  holes[i]
                  index += 1
                  holes_repeat[i] -= 1

    # Returns the sorted array.
      return array


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      UpperCamelCase__    							= input('Enter numbers separated by comma:\n')
      UpperCamelCase__    							= [int(x) for x in user_input.split(',')]
      print(pigeon_sort(unsorted))



