input: def min_key_presses(word: str) -> int:
      """
      Given a string word with unique lowercase English letters.
  
      On a telephone keypad, keys are associated with unique collections of lowercase English letters, allowing words to be formed by pressing these keys. For instance, the key 2 maps to ["a","b","c"], requiring one press for "a", two presses for "b", and three presses for "c".
  
      Keys numbered 2 to 9 can be remapped to different collections of letters with the constraint that each letter must be assigned to exactly one key. Determine the minimum number of key presses required to type the word after such remapping.
  
      Return the minimum number of key presses required for the word.
  
      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:     
      # Write a dictionary to store the frequency of each letter in the word
      letter_freq = {char: 0 for char in word}
      
      # Assign frequencies for each letter as its 1-indexed position in the word
      for i, char in enumerate(word):
          letter_freq[char] = i + 1
      
      # Sort the letters based on their frequencies in ascending order
      sorted_letters = sorted(letter_freq, key=letter_freq.get)
      
      # Write an assignment of letters to keypress counts
      keypress_assignment = {}
      keypress_count = 1
      
      # Distribute the letters among the 8 keys (2-9)
      for i, char in enumerate(sorted_letters):
          key_no = i // 3 + 1
          keypress_assignment[char] = key_no
      
      # Calculate the total number of key presses required
      min_presses = 0
      for char in word:
          min_presses += keypress_assignment[char]
      
      return min_presses
  