

def 			__snake_case	(   __UpperCamelCase  :   Any						):



      """simple docstring"""

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

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


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

      __a						:Union[str, Any]            = time.time()
      with open('dictionary.txt') as in_file:
            __a						:int            = in_file.read().splitlines()

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

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

      __a						:int            = 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.









__a						:Dict            = {hex(i)[2:]: i for i in range(16)}  # Use [:2] to strip off the leading '0x'

def 			__snake_case	(   __UpperCamelCase  :   str						):



      """simple docstring"""

      A_	     =							hex_string.strip().lower()
      if not hex_string:
            raise ValueError("Empty string was passed to the function"						)
      A_	     =							hex_string[0] == "-"
      if is_negative:
            A_	     =							hex_string[1:]
      if not all(char in hex_table for char in hex_string						):
            raise ValueError("Non-hexadecimal value was passed to the function"						)
      A_	     =							0
      for char in hex_string:
            A_	     =							16 * decimal_number + hex_table[char]
      return -decimal_number if is_negative else decimal_number


if __name__ == "__main__":
      from doctest import testmod

      testmod()