

import os

def 							__SCREAMING_SNAKE_CASE							( )      ->				int:
				_UpperCAmelCase				:						List[Any]       						=			os.path.dirname(os.path.realpath(lowerCAmelCase       )       )
				_UpperCAmelCase				:						Tuple       						=			os.path.join(lowerCAmelCase     ,					"triangle.txt"       )

				with open(lowerCAmelCase       ) as in_file:
								_UpperCAmelCase				:						Tuple       						=			[[int(lowerCAmelCase       ) for i in line.split()] for line in in_file]

				while len(lowerCAmelCase       ) != 1:
								_UpperCAmelCase				:						Dict       						=			triangle.pop()
								_UpperCAmelCase				:						int       						=			triangle[-1]
								for j in range(len(lowerCAmelCase       ) - 1       ):
												curr_row[j] += max(last_row[j]     ,					last_row[j + 1]       )
				return triangle[0][0]


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






class        A_					:




      '''simple docstring'''


      def __init__(				self:       Tuple						,      a:       Dict=None				):
       __lowerCamelCase		:							List[Any]							=						data
       __lowerCamelCase		:							Optional[Any]							=						None




      def __repr__(				self:       Optional[int]				):
       __lowerCamelCase		:							Any							=						''
       __lowerCamelCase		:							List[Any]							=						self
       while temp:
        string_rep += F'<{temp.data}> ---> '
        __lowerCamelCase		:							Any							=						temp.next
       string_rep += "<END>"
       return string_rep



def       UpperCamelCase__     (  SCREAMING_SNAKE_CASE__						):

 # if elements_list is empty
 if not elements_list:
  raise Exception('The Elements List is empty'						)

 # Set first element as Head
 __lowerCamelCase		:							Optional[int]							=						Node(elements_list[0]						)
 __lowerCamelCase		:							List[str]							=						head
 # Loop through elements from position 1
 for data in elements_list[1:]:
  __lowerCamelCase		:							str							=						Node(SCREAMING_SNAKE_CASE__						)
  __lowerCamelCase		:							Tuple							=						current.next
 return head


lowercase_           =	[1, 3, 5, 3_2, 4_4, 1_2, 4_3]
print(F"""List: {list_data}""")
print('Creating Linked List from List.')
lowercase_           =	make_linked_list(list_data)
print('Linked List:')



print(linked_list)

