

from itertools import product


def   __SCREAMING_SNAKE_CASE					(SCREAMING_SNAKE_CASE__  ,		SCREAMING_SNAKE_CASE__       ):
						snake_case_   =	sides_number
						snake_case_   =	max_face_number * dice_number
						snake_case_   =	[0] * (max_total + 1)

						snake_case_   =	1
						snake_case_   =	range(SCREAMING_SNAKE_CASE__  ,		max_face_number + 1       )
						for dice_numbers in product(SCREAMING_SNAKE_CASE__  ,		repeat=SCREAMING_SNAKE_CASE__       ):
												snake_case_   =	sum(SCREAMING_SNAKE_CASE__       )
												totals_frequencies[total] += 1

						return totals_frequencies


def   __SCREAMING_SNAKE_CASE					():
						snake_case_   =	total_frequency_distribution(
						    sides_number=4  ,		dice_number=9       )
						snake_case_   =	total_frequency_distribution(
						    sides_number=6  ,		dice_number=6       )

						snake_case_   =	0
						snake_case_   =	9
						snake_case_   =	4 * 9
						snake_case_   =	6
						for peter_total in range(SCREAMING_SNAKE_CASE__  ,		max_peter_total + 1       ):
												peter_wins_count += peter_totals_frequencies[peter_total] * sum(
												    colin_totals_frequencies[min_colin_total:peter_total]       )

						snake_case_   =	(4**9) * (6**6)
						snake_case_   =	peter_wins_count / total_games_number

						snake_case_   =	round(SCREAMING_SNAKE_CASE__  ,		ndigits=7       )

						return rounded_peter_win_probability


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


def   __SCREAMING_SNAKE_CASE					(SCREAMING_SNAKE_CASE__       ):
						snake_case_   =	[]
						if len(SCREAMING_SNAKE_CASE__       ) == 1:
												return [nums.copy()]
						for _ in range(len(SCREAMING_SNAKE_CASE__       )       ):
												snake_case_   =	nums.pop(0       )
												snake_case_   =	permute(SCREAMING_SNAKE_CASE__       )
												for perm in permutations:
																		perm.append(SCREAMING_SNAKE_CASE__       )
												result.extend(SCREAMING_SNAKE_CASE__       )
												nums.append(SCREAMING_SNAKE_CASE__       )
						return result


def   __SCREAMING_SNAKE_CASE					(SCREAMING_SNAKE_CASE__       ):

						def backtrack(SCREAMING_SNAKE_CASE__       ):
												if start == len(SCREAMING_SNAKE_CASE__       ) - 1:
																		output.append(nums[:]       )
												else:
																		for i in range(SCREAMING_SNAKE_CASE__  ,		len(SCREAMING_SNAKE_CASE__       )       ):
																								snake_case_,    snake_case_   =	nums[i], nums[start]
																								backtrack(start + 1       )
																								snake_case_,    snake_case_   =	nums[i], nums[start]  # backtrack

						snake_case_   =	[]
						backtrack(0       )
						return output


if __name__ == "__main__":
					import doctest

					# use res to print the data in permute2 function
					lowerCAmelCase_       	=	permutea([1, 2, 3])
					print(res)
					doctest.testmod()