






"""simple docstring"""



def        _lowerCAmelCase						(							UpperCAmelCase__    :   Any )						->Any:
						A__					,					A__  :					Optional[Any]											=					[], []
						while len(UpperCAmelCase__ ) > 1:
												A__					,					A__  :					Dict											=					min(UpperCAmelCase__ ), max(UpperCAmelCase__ )
												start.append(UpperCAmelCase__ )
												end.append(UpperCAmelCase__ )
												collection.remove(UpperCAmelCase__ )
												collection.remove(UpperCAmelCase__ )
						end.reverse()
						return start + collection + end


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














"""simple docstring"""



from __future__ import annotations






class 							__SCREAMING_SNAKE_CASE  :


							def __init__(     self :  Dict     ,      snake_case :  int							):
													'''simple docstring'''





													A__  :					List[Any]											=					order

													# a_{0} ... a_{k}
													A__  :					List[Any]											=					[1.0] + [0.0] * order
													# b_{0} ... b_{k}
													A__  :					str											=					[1.0] + [0.0] * order

													# x[n-1] ... x[n-k]
													A__  :					Union[str, Any]											=					[0.0] * self.order
													# y[n-1] ... y[n-k]
													A__  :					List[str]											=					[0.0] * self.order


							def   _UpperCamelCase    (     self :  Optional[int]     ,      snake_case :  list[float]     ,      snake_case :  list[float]							):
													'''simple docstring'''





													if len(snake_case							) < self.order:
																			A__  :					Any											=					[1.0, *a_coeffs]

													if len(snake_case							) != self.order + 1:
																			A__  :					str											=					(
																			    F'Expected a_coeffs to have {self.order + 1} elements '
																			    F'for {self.order}-order filter, got {len(snake_case							)}'
																			)
																			raise ValueError(snake_case							)

													if len(snake_case							) != self.order + 1:
																			A__  :					Union[str, Any]											=					(
																			    F'Expected b_coeffs to have {self.order + 1} elements '
																			    F'for {self.order}-order filter, got {len(snake_case							)}'
																			)
																			raise ValueError(snake_case							)

													A__  :					Dict											=					a_coeffs
													A__  :					Any											=					b_coeffs


							def   _UpperCamelCase    (     self :  List[str]     ,      snake_case :  float							):
													'''simple docstring'''





													A__  :					str											=					0.0

													# Start at index 1 and do index 0 at the end.
													for i in range(1     ,      self.order + 1							):
																			result += (
																			    self.b_coeffs[i] * self.input_history[i - 1]
																			    - self.a_coeffs[i] * self.output_history[i - 1]
																			)

													A__  :					Dict											=					(result + self.b_coeffs[0] * sample) / self.a_coeffs[0]

													A__  :					Tuple											=					self.input_history[:-1]
													A__  :					int											=					self.output_history[:-1]

													A__  :					Dict											=					sample
													A__  :					Tuple											=					result

													return result






