






from collections import Counter
from timeit import timeit







def   SCREAMING_SNAKE_CASE       (				snake_case_      :							str = ""  ,						):
	return sum(c % 2 for c in Counter(input_str.replace(" "  ,						""     ).lower()     ).values()     ) < 2







def   SCREAMING_SNAKE_CASE       (				snake_case_      :							str = ""     ):
	if len(snake_case_     ) == 0:
		return True
	snake_case__				:   Tuple     =						input_str.replace(" "  ,						""     ).lower()
	# character_freq_dict: Stores the frequency of every character in the input string
	snake_case__				:   dict[str, int]     =						{}

	for character in lower_case_input_str:
		snake_case__				:   Tuple     =						character_freq_dict.get(snake_case_  ,						0     ) + 1
	snake_case__				:   str     =						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   SCREAMING_SNAKE_CASE       (				snake_case_      :							str = ""     ):
	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__":
	__lowerCamelCase      :    Union[str, Any]   		=   input(
	    """Enter string to determine if it can be rearranged as a palindrome or not: """
	).strip()
	benchmark(check_str)
	__lowerCamelCase      :    Any   		=   can_string_be_rearranged_as_palindrome_counter(check_str)
	print(f"{check_str} can {'' if status else 'not '}be rearranged as a palindrome")











def   SCREAMING_SNAKE_CASE       (				snake_case_      :							str     ):
	snake_case__				:   Any     =						[0] * len(snake_case_     )

	for i in range(1  ,						len(snake_case_     )     ):
		# use last results for better performance - dynamic programming
		snake_case__				:   Union[str, Any]     =						prefix_result[i - 1]
		while j > 0 and input_string[i] != input_string[j]:
			snake_case__				:   str     =						prefix_result[j - 1]

		if input_string[i] == input_string[j]:
			j += 1
		snake_case__				:   int     =						j

	return prefix_result







def   SCREAMING_SNAKE_CASE       (				snake_case_      :							str     ):
	return max(prefix_function(snake_case_     )     )


if __name__ == "__main__":
	import doctest

	doctest.testmod()



