input: def most_common(nums):
      """ Find the most common elements in an array of integers.
      If there are multiple elements with the same maximum frequency, 
      return all of them.
      >>> most_common([3, 4, 1, 2, 5, 3, 3])
      [3]
      >>> most_common([4, 4, 4, 2, 2, 5, 3, 3, 3])
      [4, 3]
      """
output:     freq = {}
      for num in nums:
          if num in freq:
              freq[num] += 1
          else:
              freq[num] = 1
      
      max_freq = max(freq.values())
      most_common_elements = [num for num, count in freq.items() if count == max_freq]
      
      return most_common_elements