
def 	A_ (							snake_case							:   Optional[int] ,      snake_case							:   Optional[Any] )      ->    int:



						'''simple docstring'''

						while a != 0:
												__UpperCamelCase       =			b % a, a
						return b




def 	A_ (							snake_case							:   Dict ,      snake_case							:   Optional[Any] )      ->    int:



						'''simple docstring'''

						if gcd(snake_case ,      snake_case ) != 1:
												__UpperCamelCase       =			f"mod inverse of {a!r} and {m!r} does not exist"
												raise ValueError(snake_case )
						__UpperCamelCase       =			1, 0, a
						__UpperCamelCase       =			0, 1, m
						while va != 0:
												__UpperCamelCase       =			ua // va
												__UpperCamelCase       =			(ua - q * va), (ua - q * va), (ua - q * va), va, va, va
						return ua % m






from collections import Counter
from timeit import timeit




def 	A_ (							snake_case							:   str = "" ,      )      ->    bool:



						'''simple docstring'''

						return sum(c % 2 for c in Counter(input_str.replace(''' ''' ,      '''''' ).lower() ).values() ) < 2




def 	A_ (							snake_case							:   str = "" )      ->    bool:



						'''simple docstring'''

						if len(snake_case ) == 0:
												return True
						__UpperCamelCase       =			input_str.replace(''' ''' ,      '''''' ).lower()
						# character_freq_dict: Stores the frequency of every character in the input string
						__UpperCamelCase       =			{}

						for character in lower_case_input_str:
												__UpperCamelCase       =			character_freq_dict.get(snake_case ,      0 ) + 1
						__UpperCamelCase       =			0

						for character_count in character_freq_dict.values():
												if character_count % 2:
																		odd_char += 1
						if odd_char > 1:
												return False
						return True




def 	A_ (							snake_case							:   str = "" )      ->    None:



						'''simple docstring'''

						print('''\nFor string = ''' ,      snake_case ,      ''':''' )
						print(
						    '''> can_string_be_rearranged_as_palindrome_counter()''' ,      '''\tans =''' ,      can_string_be_rearranged_as_palindrome_counter(snake_case ) ,      '''\ttime =''' ,      timeit(
						        '''z.can_string_be_rearranged_as_palindrome_counter(z.check_str)''' ,      setup='''import __main__ as z''' ,      ) ,      '''seconds''' ,      )
						print(
						    '''> can_string_be_rearranged_as_palindrome()''' ,      '''\tans =''' ,      can_string_be_rearranged_as_palindrome(snake_case ) ,      '''\ttime =''' ,      timeit(
						        '''z.can_string_be_rearranged_as_palindrome(z.check_str)''' ,      setup='''import __main__ as z''' ,      ) ,      '''seconds''' ,      )


if __name__ == "__main__":
				lowercase__							:							Tuple									=			input(
				    "Enter string to determine if it can be rearranged as a palindrome or not: "
				).strip()
				benchmark(check_str)
				lowercase__							:							Dict									=			can_string_be_rearranged_as_palindrome_counter(check_str)
				print(F"{check_str} can {'' if status else 'not '}be rearranged as a palindrome")




