




def 					_A	(		SCREAMING_SNAKE_CASE					:       list[list[int]]	,	SCREAMING_SNAKE_CASE					:       int	,	SCREAMING_SNAKE_CASE					:       int	,	SCREAMING_SNAKE_CASE					:       list[int]						):





  """simple docstring"""



  if graph[path[curr_ind - 1]][next_ver] == 0:
    return False

  # 2. Validate that next vertex is not already in path
  return not any(vertex == next_ver for vertex in path						)
def 					_A	(		SCREAMING_SNAKE_CASE					:       list[list[int]]	,	SCREAMING_SNAKE_CASE					:       list[int]	,	SCREAMING_SNAKE_CASE					:       int						):





  """simple docstring"""



  if curr_ind == len(UpperCAmelCase_						):
    # return whether path exists between current and starting vertices
    return graph[path[curr_ind - 1]][path[0]] == 1

  # Recursive Step
  for next_ver in range(0	,	len(UpperCAmelCase_						)						):
    if valid_connection(UpperCAmelCase_	,	UpperCAmelCase_	,	UpperCAmelCase_	,	UpperCAmelCase_						):
      # Insert current vertex  into path as next transition
      a__     : List[str]  =next_ver
      # Validate created path
      if util_hamilton_cycle(UpperCAmelCase_	,	UpperCAmelCase_	,	curr_ind + 1						):
        return True
      # Backtrack
      a__     : List[Any]  =-1
  return False





def 					_A	(		SCREAMING_SNAKE_CASE					:       list[list[int]]	,	SCREAMING_SNAKE_CASE					:       int = 0						):





  """simple docstring"""



  a__     : int  =[-1] * (len(UpperCAmelCase_						) + 1)
  # initialize start and end of path with starting index
  a__     : Optional[Any]  =start_index
  # evaluate and if we find answer return path either return empty array
  return path if util_hamilton_cycle(UpperCAmelCase_	,	UpperCAmelCase_	,	1						) else []













import os
def 					_A	(		):





  """simple docstring"""



  a__     : Optional[int]  =os.path.join(os.path.dirname(SCREAMING_SNAKE_CASE						)	,	"num.txt"						)
  with open(SCREAMING_SNAKE_CASE						) as file_hand:
    return str(sum(int(SCREAMING_SNAKE_CASE						) for line in file_hand						)						)[:10]


if __name__ == "__main__":
     print(solution())






