




import sys
from collections import defaultdict

class   __a:






    """simple docstring"""





    def __init__(				self  )			->		Union[str, Any]:
         UpperCAmelCase_      :							Tuple       =      []





    def 							a__				(				self       ,_SCREAMING_SNAKE_CASE  )			->		Union[str, Any]:
         return self.node_position[vertex]





    def 							a__				(				self       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE  )			->		Optional[Any]:
         UpperCAmelCase_      :							List[str]       =      pos





    def 							a__				(				self       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE  )			->		Any:
         if start > size // 2 - 1:
              return
         else:
              if 2 * start + 2 >= size:
                   UpperCAmelCase_      :							Dict       =      2 * start + 1
              else:
                   if heap[2 * start + 1] < heap[2 * start + 2]:
                        UpperCAmelCase_      :							List[str]       =      2 * start + 1
                   else:
                        UpperCAmelCase_      :							str       =      2 * start + 2
              if heap[smallest_child] < heap[start]:
                   UpperCAmelCase_,   UpperCAmelCase_      :							int       =      heap[smallest_child], positions[smallest_child]
                   UpperCAmelCase_,   UpperCAmelCase_      :							Any       =      (
                       heap[start],
                       positions[start],
                   )
                   UpperCAmelCase_,   UpperCAmelCase_      :							Union[str, Any]       =      temp, tempa

                   UpperCAmelCase_      :							Union[str, Any]       =      self.get_position(positions[smallest_child]  )
                   self.set_position(
                       positions[smallest_child]       ,self.get_position(positions[start]  )  )
                   self.set_position(positions[start]       ,_SCREAMING_SNAKE_CASE  )

                   self.top_to_bottom(_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE  )





    def 							a__				(				self       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE  )			->		Tuple:
         UpperCAmelCase_      :							str       =      position[index]

         while index != 0:
              UpperCAmelCase_      :							Dict       =      int((index - 2) / 2  ) if index % 2 == 0 else int((index - 1) / 2  )

              if val < heap[parent]:
                   UpperCAmelCase_      :							int       =      heap[parent]
                   UpperCAmelCase_      :							Union[str, Any]       =      position[parent]
                   self.set_position(position[parent]       ,_SCREAMING_SNAKE_CASE  )
              else:
                   UpperCAmelCase_      :							List[str]       =      val
                   UpperCAmelCase_      :							int       =      temp
                   self.set_position(_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE  )
                   break
              UpperCAmelCase_      :							int       =      parent
         else:
              UpperCAmelCase_      :							Optional[int]       =      val
              UpperCAmelCase_      :							Any       =      temp
              self.set_position(_SCREAMING_SNAKE_CASE       ,0  )





    def 							a__				(				self       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE  )			->		Dict:
         UpperCAmelCase_      :							int       =      len(_SCREAMING_SNAKE_CASE  ) // 2 - 1
         for i in range(_SCREAMING_SNAKE_CASE       ,-1       ,-1  ):
              self.top_to_bottom(_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE       ,len(_SCREAMING_SNAKE_CASE  )       ,_SCREAMING_SNAKE_CASE  )





    def 							a__				(				self       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE  )			->		str:
         UpperCAmelCase_      :							Optional[Any]       =      positions[0]
         UpperCAmelCase_      :							Optional[Any]       =      sys.maxsize
         self.top_to_bottom(_SCREAMING_SNAKE_CASE       ,0       ,len(_SCREAMING_SNAKE_CASE  )       ,_SCREAMING_SNAKE_CASE  )
         return temp







def lowerCamelCase__       (      _lowercase				):

     '''simple docstring'''


     UpperCAmelCase_      :							str       =      Heap()

     UpperCAmelCase_      :							Optional[int]       =      [0] * len(_lowercase				)
     UpperCAmelCase_      :							Optional[int]       =      [-1] * len(_lowercase				)  # Neighboring Tree Vertex of selected vertex
     # Minimum Distance of explored vertex with neighboring vertex of partial tree
     # formed in graph
     UpperCAmelCase_      :							Dict       =      []  # Heap of Distance of vertices from their neighboring vertex
     UpperCAmelCase_      :							List[str]       =      []

     for vertex in range(len(_lowercase				)				):
          distance_tv.append(sys.maxsize				)
          positions.append(_lowercase				)
          heap.node_position.append(_lowercase				)

     UpperCAmelCase_      :							Optional[Any]       =      []
     UpperCAmelCase_      :							List[Any]       =      1
     UpperCAmelCase_      :							List[Any]       =      sys.maxsize
     for neighbor, distance in adjacency_list[0]:
          UpperCAmelCase_      :							str       =      0
          UpperCAmelCase_      :							str       =      distance
     heap.heapify(_lowercase			,						_lowercase				)

     for _ in range(1			,						len(_lowercase				)				):
          UpperCAmelCase_      :							Optional[Any]       =      heap.delete_minimum(_lowercase			,						_lowercase				)
          if visited[vertex] == 0:
               tree_edges.append((nbr_tv[vertex], vertex)				)
               UpperCAmelCase_      :							Optional[int]       =      1
               for neighbor, distance in adjacency_list[vertex]:
                    if (
                        visited[neighbor] == 0
                        and distance < distance_tv[heap.get_position(_lowercase				)]
                    ):
                         UpperCAmelCase_      :							int       =      distance
                         heap.bottom_to_top(
                             _lowercase			,						heap.get_position(_lowercase				)			,						_lowercase			,						_lowercase				)
                         UpperCAmelCase_      :							Tuple       =      vertex
     return tree_edges


if __name__ == "__main__":  # pragma: no cover
     # < --------- Prims Algorithm --------- >
     __a          =			int(input('Enter number of edges: ').strip())
     __a          =			defaultdict(list)
     for _ in range(edges_number):
          __a          =			[int(x) for x in input().strip().split()]
          adjacency_list[edge[0]].append([edge[1], edge[2]])
          adjacency_list[edge[1]].append([edge[0], edge[2]])
     print(prisms_algorithm(adjacency_list))





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.""")