input: def minimum_key_presses(word: str) -> int:
      """
      Given a string word that contains distinct lowercase English letters.
  
      Consider a telephone keypad where keys are mapped to specific sets of lowercase English letters, which can be used to type words by pressing the keys. For example, key 2 is mapped to ["a","b","c"], and to type "a", you press the key once, for "b", twice, and thrice for "c".
  
      It is possible to remap keys numbered 2 to 9 to unique sets of letters. The keys can be remapped to any number of letters, but each letter should be assigned to exactly one key. The task is to determine the minimal number of key presses required to type the string word after remapping the keys.
  
      Return the minimal number of key presses needed to type the word.
  
      Examples:
      >>> word = "abcde"
      5
      >>> word = "xycdefghij"
      12
  
      Constraints:
      1 <= word.length <= 26
      The word consists of only lowercase English letters.
      All letters in the word are unique.
      """
output:     
      key_presses = 0
      letters_count = len(word)
      
      # Distribute letters as evenly as possible across 8 keys (2 to 9)
      letters_per_key = [0] * 8  # Since we have 8 keys (2-9)
  
      # Distribute letters in a balanced manner
      i = 0
      while letters_count > 0:
          letters_per_key[i % 8] += 1
          i += 1
          letters_count -= 1
  
      # Calculate key presses
      letter_to_key_presses = {}
      letter_index = 0
      for idx, count in enumerate(letters_per_key):
          for j in range(count):
              letter_to_key_presses[word[letter_index]] = j + 1
              letter_index += 1
              
      for letter in word:
          key_presses += letter_to_key_presses[letter]
  
      return key_presses
  