import os

def        SCREAMING_SNAKE_CASE_					(						)					->     str:
							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 sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier

# Load iris file
lowercase__      :    int          =     load_iris()
iris.keys()


print(f'Target names: \n {iris.target_names} ')
print(f'\n Features: \n {iris.feature_names}')

# Train set e Test set
lowercase__     ,   lowercase__     ,   lowercase__     ,   lowercase__      :    Any          =     train_test_split(
    iris['''data'''], iris['''target'''], random_state=4
)

# KNN

lowercase__      :    int          =     KNeighborsClassifier(n_neighbors=1)
knn.fit(X_train, y_train)

# new array to test
lowercase__      :    List[str]          =     [[1, 2, 1, 4], [2, 3, 4, 5]]

lowercase__      :    int          =     knn.predict(X_new)

print(
    f'\nNew array: \n {X_new}\n\nTarget Names Prediction: \n'
    f' {iris["target_names"][prediction]}'
)



