
"""simple docstring"""
import os

# Precomputes a list of the 100 first triangular numbers
lowercase_       :						int     					=	[int(0.5 * n * (n + 1)) for n in range(1, 1_01)]





def    _lowerCAmelCase    (     )  ->    List[Any]:
  _SCREAMING_SNAKE_CASE   :				Optional[Any]							    = os.path.dirname(os.path.realpath(lowerCamelCase__				)				)
  _SCREAMING_SNAKE_CASE   :				int							    = os.path.join(lowerCamelCase__,						"words.txt"				)

  _SCREAMING_SNAKE_CASE   :				Tuple							    = ""
  with open(lowerCamelCase__				) as f:
    _SCREAMING_SNAKE_CASE   :				List[str]							    = f.readline()

  _SCREAMING_SNAKE_CASE   :				Optional[int]							    = [word.strip("\""				) for word in words.strip("\r\n"				).split(","				)]
  _SCREAMING_SNAKE_CASE   :				Optional[Any]							    = [
      word
      for word in [sum(ord(lowerCamelCase__				) - 6_4 for x in word				) for word in words]
      if word in TRIANGULAR_NUMBERS
  ]
  return len(lowerCamelCase__				)


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





"""simple docstring"""
from __future__ import annotations

lowercase_       :						List[str]     					=	'''#'''
class 			UpperCamelCase      :
     def __init__(     self				):




       """simple docstring"""


       _SCREAMING_SNAKE_CASE   :				dict							    = {}
     def 				__SCREAMING_SNAKE_CASE							(     self  ,     snake_case__				):




       """simple docstring"""


       _SCREAMING_SNAKE_CASE   :				str							    = self._trie
       for char in text:
         if char not in trie:
           _SCREAMING_SNAKE_CASE   :				List[str]							    = {}
         _SCREAMING_SNAKE_CASE   :				List[str]							    = trie[char]
       _SCREAMING_SNAKE_CASE   :				Optional[Any]							    = True
     def 				__SCREAMING_SNAKE_CASE							(     self  ,     snake_case__				):




       """simple docstring"""


       _SCREAMING_SNAKE_CASE   :				Optional[Any]							    = self._trie
       for char in prefix:
         if char in trie:
           _SCREAMING_SNAKE_CASE   :				str							    = trie[char]
         else:
           return []
       return self._elements(snake_case__				)




     def 				__SCREAMING_SNAKE_CASE							(     self  ,     snake_case__				):




       """simple docstring"""


       _SCREAMING_SNAKE_CASE   :				str							    = []
       for c, v in d.items():
         _SCREAMING_SNAKE_CASE   :				int							    = [" "] if c == END else [(c + s) for s in self._elements(snake_case__				)]
         result.extend(snake_case__				)
       return tuple(snake_case__				)
lowercase_       :						Union[str, Any]     					=	Trie()
lowercase_       :						Optional[Any]     					=	('''depart''', '''detergent''', '''daring''', '''dog''', '''deer''', '''deal''')
for word in words:
      trie.insert_word(word)





def    _lowerCAmelCase    (     lowerCamelCase__							:							str				)  ->    tuple:
  _SCREAMING_SNAKE_CASE   :				Dict							    = trie.find_word(lowerCamelCase__				)
  return tuple(string + word for word in suffixes				)





def    _lowerCAmelCase    (     )  ->    None:
  print(autocomplete_using_trie("de"				)				)


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      main()



