"""simple docstring"""



def 					_lowerCamelCase(					a ,  a							):
       print("\nThe shortest path matrix using Floyd Warshall algorithm\n"							)
       for i in range(a							):
              for j in range(a							):
                     if dist[i][j] != float("inf"							):
                            print(int(dist[i][j]							) ,  end="\t"							)
                     else:
                            print("INF" ,  end="\t"							)
              print()



def 					_lowerCamelCase(					a ,  a							):
       __a     				=  [[float("inf"							) for _ in range(a							)] for _ in range(a							)]

       for i in range(a							):
              for j in range(a							):
                     __a     				=  graph[i][j]

                     # check vertex k against all other vertices (i, j)
       for k in range(a							):
              # looping through rows of graph array
              for i in range(a							):
                     # looping through columns of graph array
                     for j in range(a							):
                            if (
                                dist[i][k] != float("inf"							)
                                and dist[k][j] != float("inf"							)
                                and dist[i][k] + dist[k][j] < dist[i][j]
                            ):
                                   __a     				=  dist[i][k] + dist[k][j]

       _print_dist(a ,  a							)
       return dist, v


if __name__ == "__main__":
   SCREAMING_SNAKE_CASE__:Dict			=	int(input("""Enter number of vertices: """))
   SCREAMING_SNAKE_CASE__:Union[str, Any]			=	int(input("""Enter number of edges: """))

   SCREAMING_SNAKE_CASE__:int			=	[[float("""inf""") for i in range(v)] for j in range(v)]

   for i in range(v):
      SCREAMING_SNAKE_CASE__:int			=	0.0

      # src and dst are indices that must be within the array size graph[e][v]
      # failure to follow this will result in an error
   for i in range(e):
      print("""\nEdge """, i + 1)
      SCREAMING_SNAKE_CASE__:Optional[int]			=	int(input("""Enter source:"""))
      SCREAMING_SNAKE_CASE__:str			=	int(input("""Enter destination:"""))
      SCREAMING_SNAKE_CASE__:List[str]			=	float(input("""Enter weight:"""))
      SCREAMING_SNAKE_CASE__:Dict			=	weight

   floyd_warshall(graph, v)

   # Example Input
   # Enter number of vertices: 3
   # Enter number of edges: 2

   # # generated graph from vertex and edge inputs
   # [[inf, inf, inf], [inf, inf, inf], [inf, inf, inf]]
   # [[0.0, inf, inf], [inf, 0.0, inf], [inf, inf, 0.0]]

   # specify source, destination and weight for edge #1
   # Edge  1
   # Enter source:1
   # Enter destination:2
   # Enter weight:2

   # specify source, destination and weight for edge #2
   # Edge  2
   # Enter source:2
   # Enter destination:1
   # Enter weight:1

   # # Expected Output from the vertice, edge and src, dst, weight inputs!!
   # 0		INF	INF
   # INF	0	2
   # INF	1	0

"""simple docstring"""



import string

# frequency taken from https://en.wikipedia.org/wiki/Letter_frequency
SCREAMING_SNAKE_CASE__:Any			=	{
    """E""": 12.70,
    """T""": 9.06,
    """A""": 8.17,
    """O""": 7.51,
    """I""": 6.97,
    """N""": 6.75,
    """S""": 6.33,
    """H""": 6.09,
    """R""": 5.99,
    """D""": 4.25,
    """L""": 4.03,
    """C""": 2.78,
    """U""": 2.76,
    """M""": 2.41,
    """W""": 2.36,
    """F""": 2.23,
    """G""": 2.02,
    """Y""": 1.97,
    """P""": 1.93,
    """B""": 1.29,
    """V""": 0.98,
    """K""": 0.77,
    """J""": 0.15,
    """X""": 0.15,
    """Q""": 0.10,
    """Z""": 0.07,
}
SCREAMING_SNAKE_CASE__:Optional[int]			=	"""ETAOINSHRDLCUMWFGYPBVKJXQZ"""
SCREAMING_SNAKE_CASE__:Tuple			=	"""ABCDEFGHIJKLMNOPQRSTUVWXYZ"""



def 					_lowerCamelCase(					a							):
       __a     				=  {letter: 0 for letter in string.ascii_uppercase}
       for letter in message.upper():
              if letter in LETTERS:
                     letter_count[letter] += 1

       return letter_count



def 					_lowerCamelCase(					a							):
       return x[0]



def 					_lowerCamelCase(					a							):
       __a     				=  get_letter_count(a							)
       __a     				=  {
           freq: [] for letter, freq in letter_to_freq.items()
       }
       for letter in LETTERS:
              freq_to_letter[letter_to_freq[letter]].append(a							)

       __a     				=  {}

       for freq in freq_to_letter:
              freq_to_letter[freq].sort(key=ETAOIN.find ,  reverse=a							)
              __a     				=  "".join(freq_to_letter[freq]							)

       __a     				=  list(freq_to_letter_str.items()							)
       freq_pairs.sort(key=a ,  reverse=a							)

       __a     				=  [freq_pair[1] for freq_pair in freq_pairs]

       return "".join(a							)



def 					_lowerCamelCase(					a							):
       __a     				=  get_frequency_order(a							)
       __a     				=  0
       for common_letter in ETAOIN[:6]:
              if common_letter in freq_order[:6]:
                     match_score += 1

       for uncommon_letter in ETAOIN[-6:]:
              if uncommon_letter in freq_order[-6:]:
                     match_score += 1

       return match_score


if __name__ == "__main__":
   import doctest

   doctest.testmod()
