




'''simple docstring'''




from __future__ import annotations




def     snake_case__     (			lowerCamelCase__					: Dict      ,		lowerCamelCase__					: int      ) -> Any:
					A_			:  Tuple			=				0
					A_			:  Optional[Any]			=				len(lowerCamelCase__      ) - 1
					while left <= right:
										A_			:  List[Any]			=				(left + right) // 2
										if left == right:
															if sorted_list[middle] < item:
																				A_			:  Tuple			=				middle + 1
															break
										elif sorted_list[middle] < item:
															A_			:  Optional[int]			=				middle + 1
										else:
															A_			:  Dict			=				middle - 1
					sorted_list.insert(lowerCamelCase__      ,		lowerCamelCase__      )
					return sorted_list




def     snake_case__     (			lowerCamelCase__					: Optional[int]      ,		lowerCamelCase__					: Any      ) -> List[str]:
					A_			:  Tuple			=				[]
					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     snake_case__     (			lowerCamelCase__					: int      ) -> Any:
					A_			:  Optional[Any]			=				len(lowerCamelCase__      )
					if length <= 1:
										return list_ad
					A_			:  Dict			=				length // 2
					return merge(sortlist_ad(list_ad[:middle]      )      ,		sortlist_ad(list_ad[middle:]      )      )




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

					if len(lowerCamelCase__      ) <= 1:
										return collection
					A_			:  int			=				[]
					A_			:  Optional[int]			=				False
					for i in range(0      ,		len(lowerCamelCase__      )      ,		2      ):
										if i == len(lowerCamelCase__      ) - 1:
															A_			:  int			=				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]]      )
					A_			:  Dict			=				sortlist_ad(lowerCamelCase__      )
					A_			:  List[Any]			=				[i[0] for i in sorted_list_ad]
					result.append(sorted_list_ad[-1][1]      )
					if has_last_odd_item:
										A_			:  str			=				collection[-1]
										A_			:  List[str]			=				binary_search_insertion(lowerCamelCase__      ,		lowerCamelCase__      )
					A_			:  Union[str, Any]			=				False
					for i in range(len(lowerCamelCase__      ) - 1      ):
										if result[i] == collection[-1] and has_last_odd_item:
															A_			:  Optional[Any]			=				True
										A_			:  List[Any]			=				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:
															A_			:  List[str]			=				result[: i + 2] + binary_search_insertion(result[i + 2 :]      ,		lowerCamelCase__      )
										else:
															A_			:  List[str]			=				result[: i + 1] + binary_search_insertion(result[i + 1 :]      ,		lowerCamelCase__      )

					return result


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









'''simple docstring'''




import io
import json
import subprocess


snake_case__ 							=    [
    ["""en""", """ru"""],
    ["""ru""", """en"""],
    ["""en""", """de"""],
    ["""de""", """en"""],
]

snake_case__ 							=    8




def     snake_case__     (			lowerCamelCase__					: Union[str, Any]      ,		lowerCamelCase__					: Optional[int]      ) -> List[Any]:
					A_			:  Tuple			=				{}
					for src, tgt in pairs:
										A_			:  List[str]			=				f'{src}-{tgt}'
										A_			:  Optional[int]			=				f'sacrebleu -t wmt19 -l {pair} --echo src'.split()
										A_			:  int			=				subprocess.run(lowerCamelCase__      ,		stdout=subprocess.PIPE      ).stdout.decode('''utf-8'''      ).splitlines()
										A_			:  List[str]			=				f'sacrebleu -t wmt19 -l {pair} --echo ref'.split()
										A_			:  Any			=				subprocess.run(lowerCamelCase__      ,		stdout=subprocess.PIPE      ).stdout.decode('''utf-8'''      ).splitlines()
										A_			:  List[Any]			=				{'''src''': src_lines[:n_objs], '''tgt''': tgt_lines[:n_objs]}
					return text


snake_case__ 							=    get_all_data(pairs, n_objs)
snake_case__ 							=    """./fsmt_val_data.json"""
with io.open(filename, """w""", encoding="""utf-8""") as f:
							snake_case__ 							=    json.dump(text, f, indent=2, ensure_ascii=False)



