"""simple docstring"""





import os
import unittest

from transformers.models.cpmant.tokenization_cpmant import VOCAB_FILES_NAMES, CpmAntTokenizer
from transformers.testing_utils import require_jieba, tooslow

from ...test_tokenization_common import TokenizerTesterMixin
@require_jieba
class  _snake_case     (					a__				, unittest.TestCase		):
						snake_case__			  =			CpmAntTokenizer
						snake_case__			  =			False






						def       lowerCamelCase__     (       self      :			Any    ):
													super().setUp()

													__lowerCamelCase					:		Dict		   =     [
													    "<d>",
													    "</d>",
													    "<s>",
													    "</s>",
													    "</_>",
													    "<unk>",
													    "<pad>",
													    "</n>",
													    "我",
													    "是",
													    "C",
													    "P",
													    "M",
													    "A",
													    "n",
													    "t",
													]
													__lowerCamelCase					:		Any		   =     os.path.join(self.tmpdirname							,					VOCAB_FILES_NAMES["vocab_file"]    )
													with open(self.vocab_file							,					"w"							,					encoding="utf-8"    ) as vocab_writer:
																				vocab_writer.write("".join([x + "\n" for x in vocab_tokens]    )    )







						@tooslow
						def       lowerCamelCase__     (       self      :			List[str]    ):
													__lowerCamelCase					:		List[str]		   =     CpmAntTokenizer.from_pretrained("openbmb/cpm-ant-10b"    )
													__lowerCamelCase					:		Optional[Any]		   =     "今天天气真好！"
													__lowerCamelCase					:		Optional[int]		   =     ["今天", "天气", "真", "好", "！"]
													__lowerCamelCase					:		Optional[Any]		   =     tokenizer.tokenize(UpperCAmelCase    )
													self.assertListEqual(UpperCAmelCase							,					UpperCAmelCase    )
													__lowerCamelCase					:		Dict		   =     "今天天气真好！"
													__lowerCamelCase					:		Optional[int]		   =     [tokenizer.bos_token] + tokens

													__lowerCamelCase					:		Optional[int]		   =     [6, 9802, 14962, 2082, 831, 244]
													self.assertListEqual(tokenizer.convert_tokens_to_ids(UpperCAmelCase    )							,					UpperCAmelCase    )

													__lowerCamelCase					:		Optional[int]		   =     tokenizer.decode(UpperCAmelCase    )
													self.assertEqual(UpperCAmelCase							,					UpperCAmelCase    )
"""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())