



import argparse
import json
import re
import string
import sys
from collections import Counter





def 		__snake_case						(    _UpperCAmelCase				):
					"""simple docstring"""






					def remove_articles(_UpperCAmelCase				):
										return re.sub(R'\b(a|an|the)\b'       ,			' '       ,			_UpperCAmelCase				)

					def white_space_fix(_UpperCAmelCase				):
										return " ".join(text.split()				)

					def remove_punc(_UpperCAmelCase				):
										lowercase						   =       set(string.punctuation				)
										return "".join(ch for ch in text if ch not in exclude				)

					def lower(_UpperCAmelCase				):
										return text.lower()

					return white_space_fix(remove_articles(remove_punc(lower(_UpperCAmelCase				)				)				)				)





def 		__snake_case						(    _UpperCAmelCase       ,			_UpperCAmelCase				):
					"""simple docstring"""






					lowercase						   =       normalize_answer(_UpperCAmelCase				).split()
					lowercase						   =       normalize_answer(_UpperCAmelCase				).split()
					lowercase						   =       Counter(_UpperCAmelCase				) & Counter(_UpperCAmelCase				)
					lowercase						   =       sum(common.values()				)
					if num_same == 0:
										return 0
					lowercase						   =       1.0 * num_same / len(_UpperCAmelCase				)
					lowercase						   =       1.0 * num_same / len(_UpperCAmelCase				)
					lowercase						   =       (2 * precision * recall) / (precision + recall)
					return fa





def 		__snake_case						(    _UpperCAmelCase       ,			_UpperCAmelCase				):
					"""simple docstring"""






					return normalize_answer(_UpperCAmelCase				) == normalize_answer(_UpperCAmelCase				)





def 		__snake_case						(    _UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase				):
					"""simple docstring"""






					lowercase						   =       []
					for ground_truth in ground_truths:
										lowercase						   =       metric_fn(_UpperCAmelCase       ,			_UpperCAmelCase				)
										scores_for_ground_truths.append(_UpperCAmelCase				)
					return max(_UpperCAmelCase				)





def 		__snake_case						(    _UpperCAmelCase       ,			_UpperCAmelCase				):
					"""simple docstring"""






					lowercase						   =       lowercase						   =       lowercase						   =       0
					for article in dataset:
										for paragraph in article["paragraphs"]:
															for qa in paragraph["qas"]:
																				total += 1
																				if qa["id"] not in predictions:
																									lowercase						   =       'Unanswered question ' + qa['id'] + ' will receive score 0.'
																									print(_UpperCAmelCase       ,			file=sys.stderr				)
																									continue
																				lowercase						   =       [x['text'] for x in qa['answers']]
																				lowercase						   =       predictions[qa['id']]
																				exact_match += metric_max_over_ground_truths(_UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase				)
																				fa += metric_max_over_ground_truths(_UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase				)

					lowercase						   =       100.0 * exact_match / total
					lowercase						   =       100.0 * fa / total

					return {"exact_match": exact_match, "f1": fa}


if __name__ == "__main__":
		__magic_name__       =     '''1.1'''
		__magic_name__       =     argparse.ArgumentParser(description='''Evaluation for SQuAD ''' + expected_version)
		parser.add_argument('''dataset_file''', help='''Dataset file''')
		parser.add_argument('''prediction_file''', help='''Prediction File''')
		__magic_name__       =     parser.parse_args()
		with open(args.dataset_file) as dataset_file:
				__magic_name__       =     json.load(dataset_file)
				if dataset_json["version"] != expected_version:
						print(
						    '''Evaluation expects v-''' + expected_version + ''', but got dataset with v-''' + dataset_json['''version'''],
						    file=sys.stderr,
						)
				__magic_name__       =     dataset_json['''data''']
		with open(args.prediction_file) as prediction_file:
				__magic_name__       =     json.load(prediction_file)
		print(json.dumps(evaluate(dataset, predictions)))











def 		__snake_case						(    _UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase				):
					"""simple docstring"""






					if right <= left:
										return
					lowercase						   =       lowercase						   =       left
					lowercase						   =       right
					lowercase						   =       sorting[left]
					while i <= b:
										if sorting[i] < pivot:
															lowercase   ,      lowercase						   =       sorting[i], sorting[a]
															a += 1
															i += 1
										elif sorting[i] > pivot:
															lowercase   ,      lowercase						   =       sorting[i], sorting[b]
															b -= 1
										else:
															i += 1
					quick_sort_apartition(_UpperCAmelCase       ,			_UpperCAmelCase       ,			a - 1				)
					quick_sort_apartition(_UpperCAmelCase       ,			b + 1       ,			_UpperCAmelCase				)





def 		__snake_case						(    _UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase				):
					"""simple docstring"""






					if left < right:
										lowercase						   =       lomuto_partition(_UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase				)
										quick_sort_lomuto_partition(_UpperCAmelCase       ,			_UpperCAmelCase       ,			pivot_index - 1				)
										quick_sort_lomuto_partition(_UpperCAmelCase       ,			pivot_index + 1       ,			_UpperCAmelCase				)





def 		__snake_case						(    _UpperCAmelCase       ,			_UpperCAmelCase       ,			_UpperCAmelCase				):
					"""simple docstring"""






					lowercase						   =       sorting[right]
					lowercase						   =       left
					for i in range(_UpperCAmelCase       ,			_UpperCAmelCase				):
										if sorting[i] < pivot:
															lowercase   ,      lowercase						   =       sorting[i], sorting[store_index]
															store_index += 1
					lowercase   ,      lowercase						   =       sorting[store_index], sorting[right]
					return store_index





def 		__snake_case						(    _UpperCAmelCase				):
					"""simple docstring"""






					if len(_UpperCAmelCase				) <= 1:
										return sorting
					return (
					    three_way_radix_quicksort([i for i in sorting if i < sorting[0]]				)
					    + [i for i in sorting if i == sorting[0]]
					    + three_way_radix_quicksort([i for i in sorting if i > sorting[0]]				)
					)


if __name__ == "__main__":
		import doctest

		doctest.testmod(verbose=True)

		__magic_name__       =     input('''Enter numbers separated by a comma:\n''').strip()
		__magic_name__       =     [int(item) for item in user_input.split(''',''')]
		quick_sort_apartition(unsorted, 0, len(unsorted) - 1)
		print(unsorted)






