

from itertools import product






def 					lowerCamelCase_     (							UpperCAmelCase_							:     int							,       UpperCAmelCase_							:     int	)						->				list[int]:




	'''simple docstring'''




	_UpperCamelCase   :		int			=						sides_number
	_UpperCamelCase   :		List[Any]			=						max_face_number * dice_number
	_UpperCamelCase   :		Any			=						[0] * (max_total + 1)

	_UpperCamelCase   :		Dict			=						1
	_UpperCamelCase   :		int			=						range(UpperCAmelCase_							,       max_face_number + 1	)
	for dice_numbers in product(UpperCAmelCase_							,       repeat=UpperCAmelCase_	):
		_UpperCamelCase   :		str			=						sum(UpperCAmelCase_	)
		totals_frequencies[total] += 1

	return totals_frequencies






def 					lowerCamelCase_     (							)						->				float:




	'''simple docstring'''




	_UpperCamelCase   :		Optional[int]			=						total_frequency_distribution(
	    sides_number=4							,       dice_number=9	)
	_UpperCamelCase   :		Optional[Any]			=						total_frequency_distribution(
	    sides_number=6							,       dice_number=6	)

	_UpperCamelCase   :		Dict			=						0
	_UpperCamelCase   :		Tuple			=						9
	_UpperCamelCase   :		int			=						4 * 9
	_UpperCamelCase   :		Union[str, Any]			=						6
	for peter_total in range(UpperCAmelCase_							,       max_peter_total + 1	):
		peter_wins_count += peter_totals_frequencies[peter_total] * sum(
		    colin_totals_frequencies[min_colin_total:peter_total]	)

	_UpperCamelCase   :		int			=						(4**9) * (6**6)
	_UpperCamelCase   :		Tuple			=						peter_wins_count / total_games_number

	_UpperCamelCase   :		str			=						round(UpperCAmelCase_							,       ndigits=7	)

	return rounded_peter_win_probability


if __name__ == "__main__":
							print(f'{solution() = }')









def 					lowerCamelCase_     (							UpperCAmelCase_							:     list	)						->				list:




	'''simple docstring'''




	if len(UpperCAmelCase_	) <= 1:
		return [tuple(UpperCAmelCase_	)]

	_UpperCamelCase   :		List[Any]			=						[]

	def generate(UpperCAmelCase_							:     int							,       UpperCAmelCase_							:     list	):
		_UpperCamelCase   :		Optional[int]			=						[0] * n
		res.append(tuple(UpperCAmelCase_	)	)

		_UpperCamelCase   :		List[Any]			=						0
		while i < n:
			if c[i] < i:
				if i % 2 == 0:
					_UpperCamelCase	,		_UpperCamelCase   :		List[str]			=						arr[i], arr[0]
				else:
					_UpperCamelCase	,		_UpperCamelCase   :		List[str]			=						arr[i], arr[c[i]]
				res.append(tuple(UpperCAmelCase_	)	)
				c[i] += 1
				_UpperCamelCase   :		Tuple			=						0
			else:
				_UpperCamelCase   :		Tuple			=						0
				i += 1

	generate(len(UpperCAmelCase_	)							,       UpperCAmelCase_	)
	return res


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




