




class       a_       :





	def __init__(							self      ,     SCREAMING_SNAKE_CASE      )  ->					int:




				"""simple docstring"""



				SCREAMING_SNAKE_CASE_								=						n
				SCREAMING_SNAKE_CASE_								=						[None] * self.n
				SCREAMING_SNAKE_CASE_								=						0  # index of the first element
				SCREAMING_SNAKE_CASE_								=						0
				SCREAMING_SNAKE_CASE_								=						0





	def __len__(							self      )  ->					int:




				"""simple docstring"""



				return self.size





	def 						A_(							self      )  ->					bool:




				"""simple docstring"""



				return self.size == 0





	def 						A_(							self      )  ->					Dict:




				"""simple docstring"""



				return False if self.is_empty() else self.array[self.front]





	def 						A_(							self      ,     SCREAMING_SNAKE_CASE      )  ->					Any:




				"""simple docstring"""



				if self.size >= self.n:
							raise Exception('QUEUE IS FULL'      )

				SCREAMING_SNAKE_CASE_								=						data
				SCREAMING_SNAKE_CASE_								=						(self.rear + 1) % self.n
				self.size += 1
				return self





	def 						A_(							self      )  ->					Union[str, Any]:




				"""simple docstring"""



				if self.size == 0:
							raise Exception('UNDERFLOW'      )

				SCREAMING_SNAKE_CASE_								=						self.array[self.front]
				SCREAMING_SNAKE_CASE_								=						None
				SCREAMING_SNAKE_CASE_								=						(self.front + 1) % self.n
				self.size -= 1
				return temp






def lowercase    (  SCREAMING_SNAKE_CASE )			->							str:


			'''simple docstring'''







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


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