






import unittest

from transformers import BlenderbotTokenizer, BlenderbotTokenizerFast
from transformers.utils import cached_property



class  __UpperCAmelCase						(unittest.TestCase       ):







			@cached_property
			def 				UpperCamelCase (      self:    List[Any]	):







									'''simple docstring'''




									return BlenderbotTokenizer.from_pretrained("""facebook/blenderbot-3B"""	)







			@cached_property
			def 				UpperCamelCase (      self:    Any	):







									'''simple docstring'''




									return BlenderbotTokenizerFast.from_pretrained("""facebook/blenderbot-3B"""	)







			def 				UpperCamelCase (      self:    Optional[Any]	):







									'''simple docstring'''




									_SCREAMING_SNAKE_CASE       =    self.tokenizer_ab
									_SCREAMING_SNAKE_CASE       =    """ I am a small frog."""
									_SCREAMING_SNAKE_CASE       =    tok([src_text] ,      padding=UpperCAmelCase_ ,      truncation=UpperCAmelCase_	)["""input_ids"""]
									_SCREAMING_SNAKE_CASE       =    tok.batch_decode(UpperCAmelCase_ ,      skip_special_tokens=UpperCAmelCase_ ,      clean_up_tokenization_spaces=UpperCAmelCase_	)[0]
									assert src_text == decoded







			def 				UpperCamelCase (      self:    str	):







									'''simple docstring'''




									_SCREAMING_SNAKE_CASE       =    self.rust_tokenizer_ab
									_SCREAMING_SNAKE_CASE       =    """ I am a small frog."""
									_SCREAMING_SNAKE_CASE       =    tok([src_text] ,      padding=UpperCAmelCase_ ,      truncation=UpperCAmelCase_	)["""input_ids"""]
									_SCREAMING_SNAKE_CASE       =    tok.batch_decode(UpperCAmelCase_ ,      skip_special_tokens=UpperCAmelCase_ ,      clean_up_tokenization_spaces=UpperCAmelCase_	)[0]
									assert src_text == decoded







			def 				UpperCamelCase (      self:    List[Any]	):







									'''simple docstring'''




									assert self.tokenizer_ab.add_prefix_space
									assert self.tokenizer_ab([""" Sam""", """Sam"""]	).input_ids == [[5_502, 2], [5_502, 2]]







			def 				UpperCamelCase (      self:    Any	):







									'''simple docstring'''




									assert self.rust_tokenizer_ab.add_prefix_space
									assert self.rust_tokenizer_ab([""" Sam""", """Sam"""]	).input_ids == [[5_502, 2], [5_502, 2]]









from __future__ import annotations

def 			__lowerCamelCase     (						snake_case__			,snake_case__						)				->    Dict:






						"""simple docstring"""





						_SCREAMING_SNAKE_CASE       =    0
						_SCREAMING_SNAKE_CASE       =    len(snake_case__						) - 1
						while left <= right:
												_SCREAMING_SNAKE_CASE       =    (left + right) // 2
												if left == right:
																		if sorted_list[middle] < item:
																								_SCREAMING_SNAKE_CASE       =    middle + 1
																		break
												elif sorted_list[middle] < item:
																		_SCREAMING_SNAKE_CASE       =    middle + 1
												else:
																		_SCREAMING_SNAKE_CASE       =    middle - 1
						sorted_list.insert(snake_case__			,snake_case__						)
						return sorted_list

def 			__lowerCamelCase     (						snake_case__			,snake_case__						)				->    Optional[Any]:






						"""simple docstring"""





						_SCREAMING_SNAKE_CASE       =    []
						while left and right:
												if left[0][0] < right[0][0]:
																		result.append(left.pop(0						)						)
												else:
																		result.append(right.pop(0						)						)
						return result + left + right

def 			__lowerCamelCase     (						snake_case__						)				->    List[str]:






						"""simple docstring"""





						_SCREAMING_SNAKE_CASE       =    len(snake_case__						)
						if length <= 1:
												return list_ad
						_SCREAMING_SNAKE_CASE       =    length // 2
						return merge(sortlist_ad(list_ad[:middle]						)			,sortlist_ad(list_ad[middle:]						)						)

def 			__lowerCamelCase     (						snake_case__						)				->    list[int]:






						"""simple docstring"""





						if len(snake_case__						) <= 1:
												return collection
						_SCREAMING_SNAKE_CASE       =    []
						_SCREAMING_SNAKE_CASE       =    False
						for i in range(0			,len(snake_case__						)			,2						):
												if i == len(snake_case__						) - 1:
																		_SCREAMING_SNAKE_CASE       =    True
												else:
																		if collection[i] < collection[i + 1]:
																								two_paired_list.append([collection[i], collection[i + 1]]						)
																		else:
																								two_paired_list.append([collection[i + 1], collection[i]]						)
						_SCREAMING_SNAKE_CASE       =    sortlist_ad(snake_case__						)
						_SCREAMING_SNAKE_CASE       =    [i[0] for i in sorted_list_ad]
						result.append(sorted_list_ad[-1][1]						)
						if has_last_odd_item:
												_SCREAMING_SNAKE_CASE       =    collection[-1]
												_SCREAMING_SNAKE_CASE       =    binary_search_insertion(snake_case__			,snake_case__						)
						_SCREAMING_SNAKE_CASE       =    False
						for i in range(len(snake_case__						) - 1						):
												if result[i] == collection[-1] and has_last_odd_item:
																		_SCREAMING_SNAKE_CASE       =    True
												_SCREAMING_SNAKE_CASE       =    sorted_list_ad[i][1]
												# If last_odd_item is inserted before the item's index,
												# you should forward index one more.
												if is_last_odd_item_inserted_before_this_index:
																		_SCREAMING_SNAKE_CASE       =    result[: i + 2] + binary_search_insertion(result[i + 2 :]			,snake_case__						)
												else:
																		_SCREAMING_SNAKE_CASE       =    result[: i + 1] + binary_search_insertion(result[i + 1 :]			,snake_case__						)

						return result


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

