






'''simple docstring'''







import os


def       __UpperCamelCase					(      ):
       """simple docstring"""




       a_						     =			os.path.dirname(os.path.realpath(lowercase_   )   )
       a_						     =			os.path.join(lowercase_   ,       'triangle.txt'   )

       with open(lowercase_   ) as f:
              a_						     =			f.readlines()

       a_						     =			[]
       for line in triangle:
              a_						     =			[]
              for number in line.strip().split(' '   ):
                     numbers_from_line.append(int(lowercase_   )   )
              a.append(lowercase_   )

       for i in range(1   ,       len(lowercase_   )   ):
              for j in range(len(a[i]   )   ):
                     a_						     =			a[i - 1][j] if j != len(a[i - 1]   ) else 0
                     a_						     =			a[i - 1][j - 1] if j > 0 else 0
                     a[i][j] += max(lowercase_   ,       lowercase_   )
       return max(a[-1]   )


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












'''simple docstring'''







def       __UpperCamelCase					(      lowercase_       :  list[int]   ,       lowercase_       :  list[int]   ,       lowercase_       :  int   ):
       """simple docstring"""




       return not any(
           neighbour == 1 and colored_vertices[i] == color
           for i, neighbour in enumerate(lowercase_   )   )


def       __UpperCamelCase					(      lowercase_       :  list[list[int]]   ,       lowercase_       :  int   ,       lowercase_       :  list[int]   ,       lowercase_       :  int   ):
       """simple docstring"""




       if index == len(lowercase_   ):
              return True

       # Recursive Step
       for i in range(lowercase_   ):
              if valid_coloring(graph[index]   ,       lowercase_   ,       lowercase_   ):
                     # Color current vertex
                     a_						     =			i
                     # Validate coloring
                     if util_color(lowercase_   ,       lowercase_   ,       lowercase_   ,       index + 1   ):
                            return True
                     # Backtrack
                     a_						     =			-1
       return False


def       __UpperCamelCase					(      lowercase_       :  list[list[int]]   ,       lowercase_       :  int   ):
       """simple docstring"""




       a_						     =			[-1] * len(lowercase_   )

       if util_color(lowercase_   ,       lowercase_   ,       lowercase_   ,       0   ):
              return colored_vertices

       return []




