input: def minimum_push_count(word: str) -> int:
      """
      Given a string of distinct lowercase English letters, determine the minimum number of key presses needed on a remapped telephone keypad to type the string.
  
      Telephone keypads have keys with their own unique sets of lowercase letters. For instance, the key 2 corresponds to ["a", "b", "c"], where "a" requires one press, "b" requires two, and "c" requires three.
  
      The keys numbered 2 to 9 can be remapped to unique sets of letters. Any number of letters can be assigned to each key, but each letter must belong to exactly one key. The task is to find the fewest number of key presses required to type the given word after remapping.
  
      Examples:
      >>> word = "abcde"
      5
      >>> word = "xycdefghij"
      12
  
      Constraints:
      1 <= word.length <= 26
      word consists of lowercase English letters.
      All letters in word are distinct.
      """
output:     
      from itertools import permutations
      
      def count_presses(mapping, word):
          presses = 0
          for char in word:
              for key, letters in mapping.items():
                  if char in letters:
                      presses += letters.index(char) + 1
                      break
          return presses
      
      min_presses = float('inf')
      keys = list("23456789")
      
      for perm in permutations(keys, len(keys)):
          mapping = {}
          idx = 0
          for char in word:
              if idx >= len(keys):
                  idx = 0
              if perm[idx] not in mapping:
                  mapping[perm[idx]] = []
              mapping[perm[idx]].append(char)
              idx += 1
          
          presses = count_presses(mapping, word)
          min_presses = min(min_presses, presses)
      
      return min_presses
  