
"""simple docstring"""


from itertools import permutations






def        lowerCAmelCase_       (		snake_case_		:      int = 5      )       ->int:
			if gon_side < 3 or gon_side > 5:
						raise ValueError('gon_side must be in the range [3, 5]'      )

			# Since it's 16, we know 10 is on the outer ring
			# Put the big numbers at the end so that they are never the first number
			lowerCamelCase__     :					List[str]		=list(range(gon_side + 1							,   0							,   -1      )      )
			lowerCamelCase__     :					Dict		=list(range(gon_side + 2							,   gon_side * 2 + 1      )      )

			for perm in permutations(small_numbers + big_numbers      ):
						lowerCamelCase__     :					Union[str, Any]		=generate_gon_ring(snake_case_							,   list(snake_case_      )      )
						if is_magic_gon(snake_case_      ):
									return int(''.join(str(snake_case_      ) for n in numbers      )      )

			lowerCamelCase__     :					List[Any]		=f"""Magic {gon_side}-gon ring is impossible"""
			raise ValueError(snake_case_      )






def        lowerCAmelCase_       (		snake_case_		:      int							,   snake_case_		:      list[int]      )       ->list[int]:
			lowerCamelCase__     :					Union[str, Any]		=[0] * (gon_side * 3)
			lowerCamelCase__     :					int		=perm[0:3]
			perm.append(perm[1]      )

			lowerCamelCase__     :					Dict		=1 if gon_side < 5 else 2

			for i in range(1							,   len(snake_case_      ) // 3 + magic_number      ):
						lowerCamelCase__     :					int		=perm[2 * i + 1]
						lowerCamelCase__     :					List[str]		=result[3 * i - 1]
						lowerCamelCase__     :					List[str]		=perm[2 * i + 2]

			return result






def        lowerCAmelCase_       (		snake_case_		:      list[int]      )       ->bool:
			if len(snake_case_      ) % 3 != 0:
						raise ValueError('a gon ring should have a length that is a multiple of 3'      )

			if min(numbers[::3]      ) != numbers[0]:
						return False

			lowerCamelCase__     :					List[Any]		=sum(numbers[:3]      )

			return all(sum(numbers[i : i + 3]      ) == total for i in range(3							,   len(snake_case_      )							,   3      )      )


if __name__ == "__main__":
							print(solution())

"""simple docstring"""


from math import cos, sin






def        lowerCAmelCase_       (		snake_case_		:      float      )       ->list[list[float]]:
			lowerCamelCase__     :					List[Any]		=float(snake_case_      )
			return [[scaling_factor * int(x == y      ) for x in range(2      )] for y in range(2      )]






def        lowerCAmelCase_       (		snake_case_		:      float      )       ->list[list[float]]:
			lowerCamelCase__	,    lowerCamelCase__     :					Union[str, Any]		=cos(snake_case_      ), sin(snake_case_      )
			return [[c, -s], [s, c]]






def        lowerCAmelCase_       (		snake_case_		:      float      )       ->list[list[float]]:
			lowerCamelCase__	,    lowerCamelCase__     :					Optional[Any]		=cos(snake_case_      ), sin(snake_case_      )
			lowerCamelCase__     :					Dict		=c * s
			return [[c * c, cs], [cs, s * s]]






def        lowerCAmelCase_       (		snake_case_		:      float      )       ->list[list[float]]:
			lowerCamelCase__	,    lowerCamelCase__     :					str		=cos(snake_case_      ), sin(snake_case_      )
			lowerCamelCase__     :					Dict		=c * s
			return [[2 * c - 1, 2 * cs], [2 * cs, 2 * s - 1]]


print(f"""    {scaling(5) = }""")
print(f"""  {rotation(45) = }""")
print(f"""{projection(45) = }""")

print(f"""{reflection(45) = }""")