




# using dfs for finding eulerian path traversal







def lowerCamelCase__       (      _lowercase			,						_lowercase			,						_lowercase			,						_lowercase=None				):

     '''simple docstring'''


     UpperCAmelCase_      :							Dict       =      (path or []) + [u]
     for v in graph[u]:
          if visited_edge[u][v] is False:
               UpperCAmelCase_,   UpperCAmelCase_      :							Any       =      True, True
               UpperCAmelCase_      :							Optional[Any]       =      dfs(_lowercase			,						_lowercase			,						_lowercase			,						_lowercase				)
     return path







def lowerCamelCase__       (      _lowercase			,						_lowercase				):

     '''simple docstring'''


     UpperCAmelCase_      :							int       =      0
     UpperCAmelCase_      :							int       =      -1
     for i in range(_lowercase				):
          if i not in graph.keys():
               continue
          if len(graph[i]				) % 2 == 1:
               odd_degree_nodes += 1
               UpperCAmelCase_      :							List[str]       =      i
     if odd_degree_nodes == 0:
          return 1, odd_node
     if odd_degree_nodes == 2:
          return 2, odd_node
     return 3, odd_node







def lowerCamelCase__       (      _lowercase			,						_lowercase				):

     '''simple docstring'''


     UpperCAmelCase_      :							Any       =      [[False for _ in range(max_node + 1				)] for _ in range(max_node + 1				)]
     UpperCAmelCase_,   UpperCAmelCase_      :							str       =      check_circuit_or_path(_lowercase			,						_lowercase				)
     if check == 3:
          print('''graph is not Eulerian'''				)
          print('''no path'''				)
          return
     UpperCAmelCase_      :							Union[str, Any]       =      1
     if check == 2:
          UpperCAmelCase_      :							Dict       =      odd_node
          print('''graph has a Euler path'''				)
     if check == 1:
          print('''graph has a Euler cycle'''				)
     UpperCAmelCase_      :							Tuple       =      dfs(_lowercase			,						_lowercase			,						_lowercase				)
     print(_lowercase				)







def lowerCamelCase__       (      ):

     '''simple docstring'''


     UpperCAmelCase_      :							str       =      {1: [2, 3, 4], 2: [1, 3], 3: [1, 2], 4: [1, 5], 5: [4]}
     UpperCAmelCase_      :							List[Any]       =      {1: [2, 3, 4, 5], 2: [1, 3], 3: [1, 2], 4: [1, 5], 5: [1, 4]}
     UpperCAmelCase_      :							List[Any]       =      {1: [2, 3, 4], 2: [1, 3, 4], 3: [1, 2], 4: [1, 2, 5], 5: [4]}
     UpperCAmelCase_      :							Tuple       =      {1: [2, 3], 2: [1, 3], 3: [1, 2]}
     UpperCAmelCase_      :							Optional[int]       =      {
         1: [],
         2: []
         # all degree is zero
     }
     UpperCAmelCase_      :							Optional[int]       =      10
     check_euler(_lowercase			,						_lowercase				)
     check_euler(_lowercase			,						_lowercase				)
     check_euler(_lowercase			,						_lowercase				)
     check_euler(_lowercase			,						_lowercase				)
     check_euler(_lowercase			,						_lowercase				)


if __name__ == "__main__":
     main()





from collections import defaultdict







def lowerCamelCase__       (      _lowercase			,						_lowercase				):

     '''simple docstring'''


     UpperCAmelCase_      :							Optional[int]       =      first_str.lower().strip()
     UpperCAmelCase_      :							Any       =      second_str.lower().strip()

     # Remove whitespace
     UpperCAmelCase_      :							Any       =      first_str.replace(''' '''			,						''''''				)
     UpperCAmelCase_      :							int       =      second_str.replace(''' '''			,						''''''				)

     # Strings of different lengths are not anagrams
     if len(_lowercase				) != len(_lowercase				):
          return False

     # Default values for count should be 0
     UpperCAmelCase_      :							defaultdict[str, int]       =      defaultdict(_lowercase				)

     # For each character in input strings,
     # increment count in the corresponding
     for i in range(len(_lowercase				)				):
          count[first_str[i]] += 1
          count[second_str[i]] -= 1

     return all(_count == 0 for _count in count.values()				)


if __name__ == "__main__":
     from doctest import testmod

     testmod()
     __a          =			input('Enter the first string ').strip()
     __a          =			input('Enter the second string ').strip()

     __a          =			check_anagrams(input_a, input_b)
     print(F"""{input_a} and {input_b} are {"" if status else "not "}anagrams.""")