'''simple docstring'''


def    _lowerCamelCase       ( lowerCamelCase_   :				List[str]      ,	lowerCamelCase_   :				Union[str, Any]  ):



     """simple docstring"""





     print('\nVertex Distance'  )
     for i in range(lowerCamelCase_  ):
          if dist[i] != float('inf'  ):
               print(lowerCamelCase_      ,	'\t'      ,	int(dist[i]  )      ,	end='\t'  )
          else:
               print(lowerCamelCase_      ,	'\t'      ,	'INF'      ,	end='\t'  )
          print()


def    _lowerCamelCase       ( lowerCamelCase_   :				Union[str, Any]      ,	lowerCamelCase_   :				int      ,	lowerCamelCase_   :				str  ):



     """simple docstring"""





     UpperCAmelCase_				:  Dict  = float('inf'  )
     UpperCAmelCase_				:  Tuple  = -1
     for i in range(lowerCamelCase_  ):
          if (not vset[i]) and mdist[i] < min_val:
               UpperCAmelCase_				:  int  = i
               UpperCAmelCase_				:  Optional[Any]  = mdist[i]
     return min_ind


def    _lowerCamelCase       ( lowerCamelCase_   :				int      ,	lowerCamelCase_   :				Optional[Any]      ,	lowerCamelCase_   :				Any  ):



     """simple docstring"""





     UpperCAmelCase_				:  str  = [float('inf'  ) for _ in range(lowerCamelCase_  )]
     UpperCAmelCase_				:  Union[str, Any]  = [False for _ in range(lowerCamelCase_  )]
     UpperCAmelCase_				:  Optional[Any]  = 0.0

     for _ in range(v - 1  ):
          UpperCAmelCase_				:  Tuple  = min_dist(lowerCamelCase_      ,	lowerCamelCase_      ,	lowerCamelCase_  )
          UpperCAmelCase_				:  Dict  = True

          for i in range(lowerCamelCase_  ):
               if (
                   (not vset[i])
                   and graph[u][i] != float('inf'  )
                   and mdist[u] + graph[u][i] < mdist[i]
               ):
                    UpperCAmelCase_				:  Any  = mdist[u] + graph[u][i]

     print_dist(lowerCamelCase_      ,	lowerCamelCase_  )


if __name__ == "__main__":
 snake_case__	:     Union[str, Any]      =    int(input('''Enter number of vertices: ''').strip())
 snake_case__	:     Any      =    int(input('''Enter number of edges: ''').strip())

 snake_case__	:     Optional[int]      =    [[float('''inf''') for i in range(V)] for j in range(V)]

 for i in range(V):
  snake_case__	:     List[Any]      =    0.0

 for i in range(E):
  print('''\nEdge ''', i + 1)
  snake_case__	:     List[str]      =    int(input('''Enter source:''').strip())
  snake_case__	:     Dict      =    int(input('''Enter destination:''').strip())
  snake_case__	:     List[Any]      =    float(input('''Enter weight:''').strip())
  snake_case__	:     List[Any]      =    weight

 snake_case__	:     Union[str, Any]      =    int(input('''\nEnter shortest path source:''').strip())
 dijkstra(graph, V, gsrc)













from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


UpperCAmelCase__    :      Optional[Any]       					={
    '''configuration_rwkv''': ['''RWKV_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''RwkvConfig''', '''RwkvOnnxConfig'''],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							UpperCAmelCase__    :      Optional[Any]       					=[
							    '''RWKV_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''RwkvForCausalLM''',
							    '''RwkvModel''',
							    '''RwkvPreTrainedModel''',
							]


if TYPE_CHECKING:
							from .configuration_rwkv import RWKV_PRETRAINED_CONFIG_ARCHIVE_MAP, RwkvConfig, RwkvOnnxConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_rwkv import (
														    RWKV_PRETRAINED_MODEL_ARCHIVE_LIST,
														    RwkvForCausalLM,
														    RwkvModel,
														    RwkvPreTrainedModel,
														)
else:
							import sys

							UpperCAmelCase__    :      int       					=_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





