

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


def 							__lowercase     (	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__   ):
										__lowerCAmelCase       =				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 							__lowercase     (	UpperCAmelCase__		,       UpperCAmelCase__   ):

					"""simple docstring"""






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


def 							__lowercase     (	UpperCAmelCase__		,       UpperCAmelCase__   ):

					"""simple docstring"""






					return normalize_answer(UpperCAmelCase__   ) == normalize_answer(UpperCAmelCase__   )


def 							__lowercase     (	UpperCAmelCase__		,       UpperCAmelCase__		,       UpperCAmelCase__   ):

					"""simple docstring"""






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


def 							__lowercase     (	UpperCAmelCase__		,       UpperCAmelCase__   ):

					"""simple docstring"""






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

					__lowerCAmelCase       =				100.0 * exact_match / total
					__lowerCAmelCase       =				100.0 * fa / total

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


if __name__ == "__main__":
		lowerCamelCase   					=  '''1.1'''
		lowerCamelCase   					=  argparse.ArgumentParser(description='''Evaluation for SQuAD ''' + expected_version)
		parser.add_argument('''dataset_file''', help='''Dataset file''')
		parser.add_argument('''prediction_file''', help='''Prediction File''')
		lowerCamelCase   					=  parser.parse_args()
		with open(args.dataset_file) as dataset_file:
				lowerCamelCase   					=  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,
						)
				lowerCamelCase   					=  dataset_json['''data''']
		with open(args.prediction_file) as prediction_file:
				lowerCamelCase   					=  json.load(prediction_file)
		print(json.dumps(evaluate(dataset, predictions)))









import random


def 							__lowercase     (	UpperCAmelCase__   ):

					"""simple docstring"""






					def is_sorted(UpperCAmelCase__   ):
										for i in range(len(UpperCAmelCase__   ) - 1   ):
															if collection[i] > collection[i + 1]:
																				return False
										return True

					while not is_sorted(UpperCAmelCase__   ):
										random.shuffle(UpperCAmelCase__   )
					return collection


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






