input: def sort_every_third(lst: list):
      """This function accepts a list lst and produces a new list where
      elements at indices that aren't multiples of three remain unchanged,
      but the elements at indices which are multiples of three are sorted,
      while maintaining their positions relative to these specific indices.
      >>> sort_every_third([1, 2, 3])
      [1, 2, 3]
      >>> sort_every_third([5, 6, 3, 4, 8, 9, 2])
      [2, 6, 3, 4, 8, 9, 5]
      """
output:     # Extract elements at indices which are multiples of three
      elements_to_sort = [lst[i] for i in range(len(lst)) if i % 3 == 0]
  
      # Sort these elements
      elements_to_sort.sort()
  
      # Write a new list to hold the result
      sorted_lst = lst[:]
  
      # Place sorted elements back into their original positions
      index = 0
      for i in range(len(sorted_lst)):
          if i % 3 == 0:
              sorted_lst[i] = elements_to_sort[index]
              index += 1
  
      return sorted_lst