"""simple docstring"""





import pytest
import requests

from datasets.utils.file_utils import http_head

from .utils import OfflineSimulationMode, RequestWouldHangIndefinitelyError, offline


@pytest.mark.integration
def    lowercase_   (   ) ->      List[Any]:



							'''simple docstring'''

							with offline(OfflineSimulationMode.CONNECTION_TIMES_OUT      ):
														with pytest.raises(__SCREAMING_SNAKE_CASE      ):
																					requests.request("GET"						,   "https://huggingface.co"      )
														with pytest.raises(requests.exceptions.ConnectTimeout      ):
																					requests.request("GET"						,   "https://huggingface.co"						,   timeout=1.0      )


@pytest.mark.integration
def    lowercase_   (   ) ->      int:



							'''simple docstring'''

							with offline(OfflineSimulationMode.CONNECTION_FAILS      ):
														with pytest.raises(requests.exceptions.ConnectionError      ):
																					requests.request("GET"						,   "https://huggingface.co"      )







def    lowercase_   (   ) ->      List[Any]:



							'''simple docstring'''

							with offline(OfflineSimulationMode.HF_DATASETS_OFFLINE_SET_TO_1      ):
														with pytest.raises(__SCREAMING_SNAKE_CASE      ):
																					http_head("https://huggingface.co"      )

"""simple docstring"""





import os


def    lowercase_   (   ) ->      List[str]:



							'''simple docstring'''

							__lowerCamelCase					:		Union[str, Any]		   =     os.path.dirname(os.path.realpath(_lowerCamelCase      )      )
							__lowerCamelCase					:		int		   =     os.path.join(_lowerCamelCase						,   "triangle.txt"      )

							with open(_lowerCamelCase      ) as f:
														__lowerCamelCase					:		List[str]		   =     f.readlines()

							__lowerCamelCase					:		List[str]		   =     []
							for line in triangle:
														__lowerCamelCase					:		Optional[int]		   =     []
														for number in line.strip().split(" "      ):
																					numbers_from_line.append(int(_lowerCamelCase      )      )
														a.append(_lowerCamelCase      )

							for i in range(1						,   len(_lowerCamelCase      )      ):
														for j in range(len(a[i]      )      ):
																					__lowerCamelCase					:		int		   =     a[i - 1][j] if j != len(a[i - 1]      ) else 0
																					__lowerCamelCase					:		Union[str, Any]		   =     a[i - 1][j - 1] if j > 0 else 0
																					a[i][j] += max(_lowerCamelCase						,   _lowerCamelCase      )
							return max(a[-1]      )


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