input: Write a function to find the index of the element which has maximum frequency.
  assert max_frequency_index([1, 2, 3, 2, 4, 1, 2, 5]) == 1
  assert max_frequency_index([4, 5, 4, 6, 7, 4, 8]) == 0
  assert max_frequency_index([9, 8, 7, 8, 7, 6, 7]) == 2
output: def max_frequency_index(arr):
      from collections import Counter
      frequency = Counter(arr)
      max_freq = max(frequency.values())
      for index, value in enumerate(arr):
          if frequency[value] == max_freq:
              return index