


'''simple docstring'''

def 							SCREAMING_SNAKE_CASE__(		_UpperCamelCase   :					str )		->       str:





   '''simple docstring'''







   UpperCamelCase__			    =    word.upper()
   UpperCamelCase__			    =    0
   UpperCamelCase__			    =    {}
   UpperCamelCase__			    =    []

   for letter in word:
      if letter not in letter_nums:
         UpperCamelCase__			    =    str(_UpperCamelCase )
         next_num += 1
      word_pattern.append(letter_nums[letter] )
   return ".".join(_UpperCamelCase )


if __name__ == "__main__":
       import pprint
       import time

       __lowercase:		Optional[Any]    						=  time.time()
       with open("dictionary.txt") as in_file:
              __lowercase:		Optional[int]    						=  in_file.read().splitlines()

       __lowercase:		dict    						=  {}
       for word in word_list:
              __lowercase:		List[str]    						=  get_word_pattern(word)
              if pattern in all_patterns:
                     all_patterns[pattern].append(word)
              else:
                     __lowercase:		Optional[int]    						=  [word]

       with open("word_patterns.txt", "w") as out_file:
              out_file.write(pprint.pformat(all_patterns))

       __lowercase:		str    						=  round(time.time() - start_time, 2)
       print(F"""Done!  {len(all_patterns):,} word patterns found in {total_time} seconds.""")
       # Done!  9,581 word patterns found in 0.58 seconds.



'''simple docstring'''







import itertools







def _UpperCamelCase			(	__A = 1000000       )				->						int:


      '''simple docstring'''



      UpperCamelCase__      =							[1]

      for i in itertools.count(len(__A       )       ):
            UpperCamelCase__      =							0
            for j in itertools.count(1       ):
                  UpperCamelCase__      =							-1 if j % 2 == 0 else +1
                  UpperCamelCase__      =							(j * j * 3 - j) // 2
                  if index > i:
                        break
                  item += partitions[i - index] * sign
                  item %= number
                  index += j
                  if index > i:
                        break
                  item += partitions[i - index] * sign
                  item %= number

            if item == 0:
                  return i
            partitions.append(__A       )

      return 0


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  print(F"""{solution() = }""")





