



class     __lowerCAmelCase					:  # Public class to implement a graph



			def __init__(		self     :						List[Any]				,	A     :						int				,	A     :						int				,	A     :						list[list[bool]])     ->					None:



						"""simple docstring"""






						_UpperCAmelCase	 =     row
						_UpperCAmelCase	 =     col
						_UpperCAmelCase	 =     graph



			def 					_lowerCamelCase (		self     :						Tuple				,	A     :						int				,	A     :						int				,	A     :						list[list[bool]])     ->					bool:



						"""simple docstring"""






						return (
						    0 <= i < self.ROW
						    and 0 <= j < self.COL
						    and not visited[i][j]
						    and self.graph[i][j]
						)



			def 					_lowerCamelCase (		self     :						Optional[Any]				,	A     :						int				,	A     :						int				,	A     :						list[list[bool]])     ->					None:



						"""simple docstring"""






						_UpperCAmelCase	 =     [-1, -1, -1, 0, 0, 1, 1, 1]  # Coordinate order
						_UpperCAmelCase	 =     [-1, 0, 1, -1, 1, -1, 0, 1]
						_UpperCAmelCase	 =     True  # Make those cells visited
						for k in range(8):
									if self.is_safe(i + row_nbr[k]				,	j + col_nbr[k]				,	UpperCamelCase__):
												self.diffs(i + row_nbr[k]				,	j + col_nbr[k]				,	UpperCamelCase__)



			def 					_lowerCamelCase (		self     :						int)     ->					int:  # And finally, count all islands.



						"""simple docstring"""






						_UpperCAmelCase	 =     [[False for j in range(self.COL)] for i in range(self.ROW)]
						_UpperCAmelCase	 =     0
						for i in range(self.ROW):
									for j in range(self.COL):
												if visited[i][j] is False and self.graph[i][j] == 1:
															self.diffs(UpperCamelCase__				,	UpperCamelCase__				,	UpperCamelCase__)
															count += 1
						return count





from collections import Counter
from timeit import timeit





def 							A			(  _UpperCAmelCase       :     str = ""							,     )       ->				bool:







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





def 							A			(  _UpperCAmelCase       :     str = ""					)       ->				bool:







			'''simple docstring'''
			if len(_UpperCAmelCase					) == 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(_UpperCAmelCase							,     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			(  _UpperCAmelCase       :     str = ""					)       ->				None:







			'''simple docstring'''
			print('\nFor string = '							,     _UpperCAmelCase							,     ':'					)
			print(
			    '> can_string_be_rearranged_as_palindrome_counter()'							,     '\tans ='							,     can_string_be_rearranged_as_palindrome_counter(_UpperCAmelCase					)							,     '\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(_UpperCAmelCase					)							,     '\ttime ='							,     timeit(
			        'z.can_string_be_rearranged_as_palindrome(z.check_str)'							,     setup='import __main__ as z'							,     )							,     'seconds'							,     )


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