"""simple docstring"""
import os







def 		__a  (      )      ->Tuple:
  a__:	Any     				=      os.path.dirname(os.path.realpath(_SCREAMING_SNAKE_CASE  )  )
  a__:	Tuple     				=      os.path.join(_SCREAMING_SNAKE_CASE						,	'triangle.txt'  )

  with open(_SCREAMING_SNAKE_CASE  ) as f:
    a__:	Dict     				=      f.readlines()

  a__:	Tuple     				=      [[int(_SCREAMING_SNAKE_CASE  ) for y in x.rstrip('\r\n'  ).split(' '  )] for x in triangle]

  for i in range(1						,	len(_SCREAMING_SNAKE_CASE  )  ):
    for j in range(len(a[i]  )  ):
      a__:	Tuple     				=      a[i - 1][j] if j != len(a[i - 1]  ) else 0
      a__:	List[str]     				=      a[i - 1][j - 1] if j > 0 else 0
      a[i][j] += max(_SCREAMING_SNAKE_CASE						,	_SCREAMING_SNAKE_CASE  )
  return max(a[-1]  )


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



'''simple docstring'''

from typing import Optional

from ..utils.logging import get_logger
from .audio_classificiation import AudioClassification
from .automatic_speech_recognition import AutomaticSpeechRecognition
from .base import TaskTemplate
from .image_classification import ImageClassification
from .language_modeling import LanguageModeling
from .question_answering import QuestionAnsweringExtractive
from .summarization import Summarization
from .text_classification import TextClassification


_lowerCamelCase :				int														= [
    """AutomaticSpeechRecognition""",
    """AudioClassification""",
    """ImageClassification""",
    """LanguageModeling""",
    """QuestionAnsweringExtractive""",
    """Summarization""",
    """TaskTemplate""",
    """TextClassification""",
]

_lowerCamelCase :				int														= get_logger(__name__)


_lowerCamelCase :				List[str]														= {
    AutomaticSpeechRecognition.task: AutomaticSpeechRecognition,
    AudioClassification.task: AudioClassification,
    ImageClassification.task: ImageClassification,
    LanguageModeling.task: LanguageModeling,
    QuestionAnsweringExtractive.task: QuestionAnsweringExtractive,
    Summarization.task: Summarization,
    TextClassification.task: TextClassification,
}



def  _lowerCAmelCase				(				__a      )  ->      Optional[TaskTemplate]:
     '''simple docstring'''







     _UpperCamelCase  :List[str]       =task_template_dict.get("""task"""      )
     if task_name is None:
          logger.warning(F'''Couldn\'t find template for task \'{task_name}\'. Available templates: {list(__a      )}'''      )
          return None
     _UpperCamelCase  :List[str]       =NAMEaTEMPLATE.get(__a      )
     return template.from_dict(__a      )