





import os





def lowerCAmelCase__()    ->				Optional[Any]:







	'''simple docstring'''







	lowerCamelCase__        =		os.path.dirname(os.path.realpath(__snake_case							)							)
	lowerCamelCase__        =		os.path.join(__snake_case	,'''triangle.txt'''							)

	with open(__snake_case							) as f:
		lowerCamelCase__        =		f.readlines()

	lowerCamelCase__        =		[[int(__snake_case							) for y in x.rstrip('''\r\n'''							).split(''' '''							)] for x in triangle]

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


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










from __future__ import annotations

import math
import random





def lowerCAmelCase__(__snake_case	,__snake_case	,__snake_case							)    ->				list[int]:







	'''simple docstring'''







	lowerCamelCase__        =		d * e - 1
	lowerCamelCase__        =		0
	lowerCamelCase__        =		0
	while p == 0:
		lowerCamelCase__        =		random.randint(2	,n - 1							)
		lowerCamelCase__        =		k
		while True:
			if t % 2 == 0:
				lowerCamelCase__        =		t // 2
				lowerCamelCase__        =		(g**t) % n
				lowerCamelCase__        =		math.gcd(x - 1	,__snake_case							)
				if x > 1 and y > 1:
					lowerCamelCase__        =		y
					lowerCamelCase__        =		n // y
					break  # find the correct factors
			else:
				break  # t is not divisible by 2, break and choose another g
	return sorted([p, q]							)


if __name__ == "__main__":
			import doctest

			doctest.testmod()



