






"""simple docstring"""

import os
from collections.abc import Iterator

def 		__lowerCamelCase	(  __UpperCamelCase = "."       )						->    Iterator[str]:

		"""simple docstring"""







		for dir_path, dir_names, filenames in os.walk(__UpperCamelCase       ):
				lowerCAmelCase_   :							Optional[Any]									=			[d for d in dir_names if d != "scripts" and d[0] not in "._"]
				for filename in filenames:
						if filename == "__init__.py":
								continue
						if os.path.splitext(__UpperCamelCase       )[1] in (".py", ".ipynb"):
								yield os.path.join(__UpperCamelCase      ,       __UpperCamelCase       ).lstrip("./"       )

def 		__lowerCamelCase	(  __UpperCamelCase       )						->    str:

		"""simple docstring"""







		return f'''{i * "  "}*''' if i else "\n##"

def 		__lowerCamelCase	(  __UpperCamelCase      ,       __UpperCamelCase       )						->    str:

		"""simple docstring"""







		lowerCAmelCase_   :							Any									=			old_path.split(os.sep       )
		for i, new_part in enumerate(new_path.split(os.sep       )       ):
				if (i + 1 > len(__UpperCamelCase       ) or old_parts[i] != new_part) and new_part:
						print(f'''{md_prefix(__UpperCamelCase       )} {new_part.replace("_"      ,       " "       ).title()}'''       )
		return new_path

def 		__lowerCamelCase	(  __UpperCamelCase = "."       )						->    None:

		"""simple docstring"""







		lowerCAmelCase_   :							Dict									=			""
		for filepath in sorted(good_file_paths(__UpperCamelCase       )       ):
				lowerCAmelCase_				,	lowerCAmelCase_   :							str									=			os.path.split(__UpperCamelCase       )
				if filepath != old_path:
						lowerCAmelCase_   :							Union[str, Any]									=			print_path(__UpperCamelCase      ,       __UpperCamelCase       )
				lowerCAmelCase_   :							Optional[Any]									=			(filepath.count(os.sep       ) + 1) if filepath else 0
				lowerCAmelCase_   :							Union[str, Any]									=			f'''{filepath}/{filename}'''.replace(" "      ,       "%20"       )
				lowerCAmelCase_   :							Dict									=			os.path.splitext(filename.replace("_"      ,       " "       ).title()       )[0]
				print(f'''{md_prefix(__UpperCamelCase       )} [{filename}]({url})'''       )


if __name__ == "__main__":
					print_directory_md(""".""")








"""simple docstring"""

import os

def 		__lowerCamelCase	(  )						->    Optional[Any]:

		"""simple docstring"""







		lowerCAmelCase_   :							Union[str, Any]									=			os.path.dirname(os.path.realpath(__UpperCamelCase       )       )
		lowerCAmelCase_   :							List[str]									=			os.path.join(__UpperCamelCase      ,       "triangle.txt"       )

		with open(__UpperCamelCase       ) as f:
				lowerCAmelCase_   :							Optional[int]									=			f.readlines()

		lowerCAmelCase_   :							Union[str, Any]									=			[]
		for line in triangle:
				lowerCAmelCase_   :							Any									=			[]
				for number in line.strip().split(" "       ):
						numbers_from_line.append(int(__UpperCamelCase       )       )
				a.append(__UpperCamelCase       )

		for i in range(1      ,       len(__UpperCamelCase       )       ):
				for j in range(len(a[i]       )       ):
						lowerCAmelCase_   :							Optional[Any]									=			a[i - 1][j] if j != len(a[i - 1]       ) else 0
						lowerCAmelCase_   :							int									=			a[i - 1][j - 1] if j > 0 else 0
						a[i][j] += max(__UpperCamelCase      ,       __UpperCamelCase       )
		return max(a[-1]       )


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