




from __future__ import annotations

from collections import Counter
from random import random




class 						__lowercase		:




      """simple docstring"""





      def __init__(				self     )		->    str:
         snake_case				:    Optional[Any]           =	{}

      def      UpperCAmelCase				(				self    ,				A     )		->    None:
         snake_case				:    int           =	{}

      def      UpperCAmelCase				(				self    ,				A    ,				A    ,				A     )		->    None:
         if nodea not in self.connections:
            self.add_node(A     )
         if nodea not in self.connections:
            self.add_node(A     )
         snake_case				:    Tuple           =	probability

      def      UpperCAmelCase				(				self     )		->    list[str]:
         return list(self.connections     )

      def      UpperCAmelCase				(				self    ,				A     )		->    str:
         snake_case				:    List[Any]           =	0
         snake_case				:    Union[str, Any]           =	random()

         for dest in self.connections[node]:
            current_probability += self.connections[node][dest]
            if current_probability > random_value:
               return dest
         return ""




def 						SCREAMING_SNAKE_CASE__ (   lowercase						,lowercase						,lowercase					)  ->       dict[str, int]:
   snake_case				:    str           =	MarkovChainGraphUndirectedUnweighted()

   for nodea, nodea, probability in transitions:
      graph.add_transition_probability(lowercase						,lowercase						,lowercase					)

   snake_case				:    Any           =	Counter(graph.get_nodes()					)
   snake_case				:    List[str]           =	start

   for _ in range(lowercase					):
      snake_case				:    List[Any]           =	graph.transition(lowercase					)
      visited[node] += 1

   return visited


if __name__ == "__main__":
       import doctest

       doctest.testmod()











from collections import defaultdict




def 						SCREAMING_SNAKE_CASE__ (   lowercase						,lowercase					)  ->       bool:
   snake_case				:    List[str]           =	first_str.lower().strip()
   snake_case				:    List[str]           =	second_str.lower().strip()

   # Remove whitespace
   snake_case				:    Any           =	first_str.replace(""" """						,""""""					)
   snake_case				:    List[str]           =	second_str.replace(""" """						,""""""					)

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

   # Default values for count should be 0
   snake_case				:    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()
       lowerCamelCase	:	List[Any]				=   input('Enter the first string ').strip()
       lowerCamelCase	:	Optional[int]				=   input('Enter the second string ').strip()

       lowerCamelCase	:	Optional[Any]				=   check_anagrams(input_a, input_b)
       print(f"""{input_a} and {input_b} are {"" if status else "not "}anagrams.""")





