
"""simple docstring"""





def 				lowerCamelCase__		(      __snake_case,					__snake_case,					__snake_case     )							->		int:


					"""simple docstring"""





					if exponent == 1:
										return base
					if exponent % 2 == 0:
										_UpperCamelCase										=  _modexpt(__snake_case,					exponent // 2,					__snake_case     ) % modulo_value
										return (x * x) % modulo_value
					else:
										return (base * _modexpt(__snake_case,					exponent - 1,					__snake_case     )) % modulo_value



def 				lowerCamelCase__		(      __snake_case = 17_77,					__snake_case = 18_55,					__snake_case = 8     )							->		int:


					"""simple docstring"""





					_UpperCamelCase										=  base
					for _ in range(1,					__snake_case     ):
										_UpperCamelCase										=  _modexpt(__snake_case,					__snake_case,					10**digits     )

					return result


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








"""simple docstring"""





class    _UpperCAmelCase:



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






							'''simple docstring'''
							_UpperCamelCase										=  name
							_UpperCamelCase										=  value
							_UpperCamelCase										=  weight



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






							'''simple docstring'''
							return F'''{self.__class__.__name__}({self.name}, {self.value}, {self.weight})'''



		def 						UpperCAmelCase							( self)	->	Tuple:






							'''simple docstring'''
							return self.value



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






							'''simple docstring'''
							return self.name



		def 						UpperCAmelCase							( self)	->	int:






							'''simple docstring'''
							return self.weight




		def 						UpperCAmelCase							( self)	->	Any:






							'''simple docstring'''
							return self.value / self.weight





def 				lowerCamelCase__		(      __snake_case,					__snake_case,					__snake_case     )							->		Optional[Any]:


					"""simple docstring"""





					_UpperCamelCase										=  []
					for i in range(len(__snake_case     )     ):
										menu.append(Things(name[i],					value[i],					weight[i]     )     )
					return menu



def 				lowerCamelCase__		(      __snake_case,					__snake_case,					__snake_case     )							->		List[str]:


					"""simple docstring"""





					_UpperCamelCase										=  sorted(__snake_case,					key=__snake_case,					reverse=__snake_case     )
					_UpperCamelCase										=  []
					_UpperCamelCase			,  _UpperCamelCase										=  0.0, 0.0
					for i in range(len(__snake_case     )     ):
										if (total_cost + items_copy[i].get_weight()) <= max_cost:
															result.append(items_copy[i]     )
															total_cost += items_copy[i].get_weight()
															total_value += items_copy[i].get_value()
					return (result, total_value)



def 				lowerCamelCase__		(      )							->		List[str]:


					"""simple docstring"""







if __name__ == "__main__":
				import doctest

				doctest.testmod()






