




from __future__ import annotations

from collections.abc import MutableSequence
class     a__					:






						def __init__(     self	,    _A	,    _A    ):




											"""simple docstring"""



											if len(_A    ) != degree + 1:
																raise ValueError(
																    "The number of coefficients should be equal to the degree + 1."    )

											__lowerCAmelCase            = list(_A    )
											__lowerCAmelCase            = degree






						def __add__(     self	,    _A    ):




											"""simple docstring"""



											if self.degree > polynomial_a.degree:
																__lowerCAmelCase            = self.coefficients[:]
																for i in range(polynomial_a.degree + 1    ):
																					coefficients[i] += polynomial_a.coefficients[i]
																return Polynomial(self.degree	,    _A    )
											else:
																__lowerCAmelCase            = polynomial_a.coefficients[:]
																for i in range(self.degree + 1    ):
																					coefficients[i] += self.coefficients[i]
																return Polynomial(polynomial_a.degree	,    _A    )






						def __sub__(     self	,    _A    ):




											"""simple docstring"""



											return self + polynomial_a * Polynomial(0	,    [-1]    )






						def __neg__(     self    ):




											"""simple docstring"""



											return Polynomial(self.degree	,    [-c for c in self.coefficients]    )






						def __mul__(     self	,    _A    ):




											"""simple docstring"""



											__lowerCAmelCase            = [0] * (self.degree + polynomial_a.degree + 1)
											for i in range(self.degree + 1    ):
																for j in range(polynomial_a.degree + 1    ):
																					coefficients[i + j] += (
																					    self.coefficients[i] * polynomial_a.coefficients[j]
																					)

											return Polynomial(self.degree + polynomial_a.degree	,    _A    )






						def        __SCREAMING_SNAKE_CASE(     self	,    _A    ):




											"""simple docstring"""



											__lowerCAmelCase            = 0
											for i in range(self.degree + 1    ):
																result += self.coefficients[i] * (substitution**i)
											return result






						def __str__(     self    ):




											"""simple docstring"""



											__lowerCAmelCase            = ""
											for i in range(self.degree	,    -1	,    -1    ):
																if self.coefficients[i] == 0:
																					continue
																elif self.coefficients[i] > 0:
																					if polynomial:
																										polynomial += " + "
																else:
																					polynomial += " - "

																if i == 0:
																					polynomial += str(abs(self.coefficients[i]    )    )
																elif i == 1:
																					polynomial += str(abs(self.coefficients[i]    )    ) + "x"
																else:
																					polynomial += str(abs(self.coefficients[i]    )    ) + "x^" + str(_A    )

											return polynomial






						def __repr__(     self    ):




											"""simple docstring"""



											return self.__str__()






						def        __SCREAMING_SNAKE_CASE(     self    ):




											"""simple docstring"""



											__lowerCAmelCase            = [0] * self.degree
											for i in range(self.degree    ):
																__lowerCAmelCase            = self.coefficients[i + 1] * (i + 1)
											return Polynomial(self.degree - 1	,    _A    )






						def        __SCREAMING_SNAKE_CASE(     self	,    _A = 0    ):




											"""simple docstring"""



											__lowerCAmelCase            = [0] * (self.degree + 2)
											__lowerCAmelCase            = constant
											for i in range(self.degree + 1    ):
																__lowerCAmelCase            = self.coefficients[i] / (i + 1)
											return Polynomial(self.degree + 1	,    _A    )






						def __eq__(     self	,    _A    ):




											"""simple docstring"""



											if not isinstance(_A	,    _A    ):
																return False

											if self.degree != polynomial_a.degree:
																return False

											for i in range(self.degree + 1    ):
																if self.coefficients[i] != polynomial_a.coefficients[i]:
																					return False

											return True






						def __ne__(     self	,    _A    ):




											"""simple docstring"""



											return not self.__eq__(_A    )









def 			_a   (		SCREAMING_SNAKE_CASE_							:       int   ,   SCREAMING_SNAKE_CASE_							:       int  ):
					if b == 0:
										return 1
					if (b % 2) == 0:
										return actual_power(SCREAMING_SNAKE_CASE_   ,   int(b / 2  )  ) * actual_power(SCREAMING_SNAKE_CASE_   ,   int(b / 2  )  )
					else:
										return a * actual_power(SCREAMING_SNAKE_CASE_   ,   int(b / 2  )  ) * actual_power(SCREAMING_SNAKE_CASE_   ,   int(b / 2  )  )







def 			_a   (		SCREAMING_SNAKE_CASE_							:       int   ,   SCREAMING_SNAKE_CASE_							:       int  ):
					if b < 0:
										return 1 / actual_power(SCREAMING_SNAKE_CASE_   ,   SCREAMING_SNAKE_CASE_  )
					return actual_power(SCREAMING_SNAKE_CASE_   ,   SCREAMING_SNAKE_CASE_  )


if __name__ == "__main__":
					print(power(-2, -3))




