"""simple docstring"""






import math



def 						a_		(      lowerCamelCase      ,    lowerCamelCase ):
				if 0 not in (x, y):
								# We use the relation x^y = y*log10(x), where 10 is the base.
								return y * math.logaa(lowercase_ )
				else:
								if x == 0:  # 0 raised to any number is 0
												return 0
								elif y == 0:
												return 1  # any number raised to 0 is 1
				raise AssertionError('This should never happen' )


if __name__ == "__main__":  # Main function
						# Read two numbers from input and typecast them to int using map function.
						# Here x is the base and y is the power.
						lowerCAmelCase__						:						Optional[int]		  =			'Enter the base and the power separated by a comma: '
						lowerCAmelCase__						:						Dict		  =			map(int, input(prompt).split(','))
						lowerCAmelCase__						:						Optional[Any]		  =			map(int, input(prompt).split(','))

						# We find the log of each number, using the function res(), which takes two
						# arguments.
						lowerCAmelCase__						:						Any		  =			res(xa, ya)
						lowerCAmelCase__						:						str		  =			res(xa, ya)

						# We check for the largest number
						if resa > resa:
												print('Largest number is', xa, '^', ya)
						elif resa > resa:
												print('Largest number is', xa, '^', ya)
						else:
												print('Both are equal')




"""simple docstring"""






from __future__ import annotations

import collections
import pprint
from pathlib import Path



def 						a_		(      lowerCamelCase ):
				return "".join(sorted(lowerCamelCase ) )



def 						a_		(      lowerCamelCase ):
				return word_by_signature[signature(lowerCamelCase )]


lowerCAmelCase__						:						str		  =			Path(__file__).parent.joinpath('words.txt').read_text(encoding='utf-8')
lowerCAmelCase__						:						str		  =			sorted({word.strip().lower() for word in data.splitlines()})

lowerCAmelCase__						:						Optional[Any]		  =			collections.defaultdict(list)
for word in word_list:
						word_by_signature[signature(word)].append(word)

if __name__ == "__main__":
						lowerCAmelCase__						:						int		  =			{word: anagram(word) for word in word_list if len(anagram(word)) > 1}

						with open('anagrams.txt', 'w') as file:
												file.write('all_anagrams = \n ')
												file.write(pprint.pformat(all_anagrams))



