



"""simple docstring"""
import os
def   A_    (     ):







						'''simple docstring'''


						snake_case_					:Optional[Any]		=     os.path.dirname(os.path.realpath(_lowercase      )      )
						snake_case_					:int		=     os.path.join(_lowercase,   """triangle.txt"""      )

						with open(_lowercase      ) as in_file:
												snake_case_					:List[Any]		=     [[int(_lowercase      ) for i in line.split()] for line in in_file]

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


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








"""simple docstring"""


from __future__ import annotations




def      snake_case    (A_ :int ):







  '''simple docstring'''

  assert (
      isinstance(A_      ,     A_ ) and mask > 0
  ), f'''mask needs to be positive integer, your input {mask}'''
  a	:     Any							=  []
  a	:     Union[str, Any]							=  mask

  while submask:
    all_submasks.append(A_ )
    a	:     Any							=  (submask - 1) & mask

  return all_submasks


if __name__ == "__main__":
   import doctest

   doctest.testmod()




