

'''simple docstring'''

def     __magic_name__       ( A					,   A					,   A							)			->		Any:
	assert b != 0, "This cannot accept modulo that is == 0"
	if n == 0:
		return 1

	if n % 2 == 1:
		return (bin_exp_mod(A					,   n - 1					,   A							) * a) % b

	snake_case							 =				bin_exp_mod(A					,   n / 2					,   A							)
	return (r * r) % b


if __name__ == "__main__":
						try:
												lowerCAmelCase_						   =			int(input("Enter Base : ").strip())
												lowerCAmelCase_						   =			int(input("Enter Power : ").strip())
												lowerCAmelCase_						   =			int(input("Enter Modulo : ").strip())
						except ValueError:
												print("Invalid literal for integer")

						print(bin_exp_mod(BASE, POWER, MODULO))








'''simple docstring'''

import os

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

lowerCAmelCase_						   =			{"UserAgent": UserAgent().random}
lowerCAmelCase_						   =			"https://www.mywaifulist.moe/random"

def     __magic_name__       ( A					,   A							)			->		None:
	snake_case							 =				requests.get(A					,   headers=A							)
	with open(A					,   'wb'							) as file:
		file.write(image.content							)

def     __magic_name__       ( )			->		tuple[str, str, str]:
	snake_case							 =				BeautifulSoup(requests.get(A					,   headers=A							).text					,   'html.parser'							)
	snake_case							 =				soup.find('meta'					,   attrs={'property': 'og:title'}							).attrs['content']
	snake_case							 =				soup.find('meta'					,   attrs={'property': 'og:image'}							).attrs['content']
	snake_case							 =				soup.find('p'					,   id='description'							).get_text()
	snake_case , snake_case							 =				os.path.splitext(os.path.basename(A							)							)
	snake_case							 =				title.strip().replace(' '					,   '_'							)
	snake_case							 =				F'''{image_title}{image_extension}'''
	save_image(A					,   A							)
	return (title, description, image_title)


if __name__ == "__main__":
						lowerCAmelCase_   ,	lowerCAmelCase_   ,	lowerCAmelCase_						   =			random_anime_character()
						print(f"{title}\n\n{desc}\n\nImage saved : {image_title}")





