


class 	_a							:

							def __init__(							self:     Optional[Any]   ,						UpperCamelCase_:     int   ,						UpperCamelCase_:     Union[str, Any]=None   ,						UpperCamelCase_:     List[str]=None							)      ->       Optional[int]:





									"""simple docstring"""







									lowercase__						=				data
									lowercase__						=				previous
									lowercase__						=				next_node

							def __str__(							self:     List[str]							)      ->       str:





									"""simple docstring"""







									return f'{self.data}'

							def 				lowerCamelCase_			(							self:     Union[str, Any]							)      ->       int:





									"""simple docstring"""







									return self.data

							def 				lowerCamelCase_			(							self:     List[str]							)      ->       List[Any]:





									"""simple docstring"""







									return self.next


							def 				lowerCamelCase_			(							self:     str							)      ->       List[str]:





									"""simple docstring"""







									return self.previous


class 	_a							:

							def __init__(							self:     Dict   ,						UpperCamelCase_:     str							)      ->       Optional[Any]:





									"""simple docstring"""







									lowercase__						=				head

							def __iter__(							self:     str							)      ->       Optional[int]:





									"""simple docstring"""







									return self


							def 				lowerCamelCase_			(							self:     List[str]							)      ->       Optional[int]:





									"""simple docstring"""







									if not self.current:
											raise StopIteration
									else:
											lowercase__						=				self.current.get_data()
											lowercase__						=				self.current.get_next()
											return value


class 	_a							:

							def __init__(							self:     Union[str, Any]							)      ->       List[str]:





									"""simple docstring"""







									lowercase__						=				None  # First node in list
									lowercase__						=				None  # Last node in list

							def __str__(							self:     Dict							)      ->       int:





									"""simple docstring"""







									lowercase__						=				self.head
									lowercase__						=				[]
									while current is not None:
											nodes.append(current.get_data()							)
											lowercase__						=				current.get_next()
									return " ".join(str(UpperCamelCase_							) for node in nodes							)

							def __contains__(							self:     Union[str, Any]   ,						UpperCamelCase_:     int							)      ->       List[Any]:





									"""simple docstring"""







									lowercase__						=				self.head
									while current:
											if current.get_data() == value:
													return True
											lowercase__						=				current.get_next()
									return False

							def __iter__(							self:     Optional[Any]							)      ->       int:





									"""simple docstring"""







									return LinkedListIterator(self.head							)

							def 				lowerCamelCase_			(							self:     Union[str, Any]							)      ->       Optional[Any]:





									"""simple docstring"""







									if self.head:
											return self.head.get_data()
									return None

							def 				lowerCamelCase_			(							self:     Optional[Any]							)      ->       Tuple:





									"""simple docstring"""







									if self.tail:
											return self.tail.get_data()
									return None

							def 				lowerCamelCase_			(							self:     Tuple   ,						UpperCamelCase_:     Node							)      ->       None:





									"""simple docstring"""







									if self.head is None:
											lowercase__						=				node
											lowercase__						=				node
									else:
											self.insert_before_node(self.head   ,						UpperCamelCase_							)

							def 				lowerCamelCase_			(							self:     Optional[int]   ,						UpperCamelCase_:     Node							)      ->       None:





									"""simple docstring"""







									if self.head is None:
											self.set_head(UpperCamelCase_							)
									else:
											self.insert_after_node(self.tail   ,						UpperCamelCase_							)

							def 				lowerCamelCase_			(							self:     Tuple   ,						UpperCamelCase_:     int							)      ->       None:





									"""simple docstring"""







									lowercase__						=				Node(UpperCamelCase_							)
									if self.head is None:
											self.set_head(UpperCamelCase_							)
									else:
											self.set_tail(UpperCamelCase_							)

							def 				lowerCamelCase_			(							self:     Optional[int]   ,						UpperCamelCase_:     Node   ,						UpperCamelCase_:     Node							)      ->       None:





									"""simple docstring"""







									lowercase__						=				node
									lowercase__						=				node.previous

									if node.get_previous() is None:
											lowercase__						=				node_to_insert
									else:
											lowercase__						=				node_to_insert

									lowercase__						=				node_to_insert

							def 				lowerCamelCase_			(							self:     str   ,						UpperCamelCase_:     Node   ,						UpperCamelCase_:     Node							)      ->       None:





									"""simple docstring"""







									lowercase__						=				node
									lowercase__						=				node.next

									if node.get_next() is None:
											lowercase__						=				node_to_insert
									else:
											lowercase__						=				node_to_insert

									lowercase__						=				node_to_insert

							def 				lowerCamelCase_			(							self:     Union[str, Any]   ,						UpperCamelCase_:     int   ,						UpperCamelCase_:     int							)      ->       None:





									"""simple docstring"""







									lowercase__						=				1
									lowercase__						=				Node(UpperCamelCase_							)
									lowercase__						=				self.head
									while node:
											if current_position == position:
													self.insert_before_node(UpperCamelCase_   ,						UpperCamelCase_							)
													return
											current_position += 1
											lowercase__						=				node.next
									self.insert_after_node(self.tail   ,						UpperCamelCase_							)

							def 				lowerCamelCase_			(							self:     Union[str, Any]   ,						UpperCamelCase_:     int							)      ->       Node:





									"""simple docstring"""







									lowercase__						=				self.head
									while node:
											if node.get_data() == item:
													return node
											lowercase__						=				node.get_next()
									raise Exception('''Node not found'''							)

							def 				lowerCamelCase_			(							self:     Optional[int]   ,						UpperCamelCase_:     str							)      ->       List[str]:





									"""simple docstring"""







									if (node := self.get_node(UpperCamelCase_							)) is not None:
											if node == self.head:
													lowercase__						=				self.head.get_next()

											if node == self.tail:
													lowercase__						=				self.tail.get_previous()

											self.remove_node_pointers(UpperCamelCase_							)

							@staticmethod
							def 				lowerCamelCase_			(							UpperCamelCase_:     Node							)      ->       None:





									"""simple docstring"""







									if node.get_next():
											lowercase__						=				node.previous

									if node.get_previous():
											lowercase__						=				node.next

									lowercase__						=				None
									lowercase__						=				None


							def 				lowerCamelCase_			(							self:     Union[str, Any]							)      ->       Union[str, Any]:





									"""simple docstring"""







									return self.head is None
def       _a			(				):


		"""simple docstring"""






if __name__ == "__main__":
			import doctest

			doctest.testmod()






def       _a			(				SCREAMING_SNAKE_CASE						,    SCREAMING_SNAKE_CASE					):


		"""simple docstring"""




		return base * power(SCREAMING_SNAKE_CASE						,    (exponent - 1)					) if exponent else 1


if __name__ == "__main__":
			print('Raise base to the power of exponent using recursion...')
			lowerCAmelCase	=							int(input('Enter the base: ').strip())
			lowerCAmelCase	=							int(input('Enter the exponent: ').strip())
			lowerCAmelCase	=							power(base, abs(exponent))
			if exponent < 0:  # power() does not properly deal w/ negative exponents
						lowerCAmelCase	=							1 / result
			print(f"""{base} to the power of {exponent} is {result}""")


