text: #!/bin/python3
  
  import math
  import os
  import random
  import re
  import sys
  
  # Complete the cutTheSticks function below.
  def cutTheSticks(arr):
      stick_count = []
  
      while arr:
          stick_count.append(len(arr))
          arr = [stick for stick in arr if stick != min(arr)]
  
      return stick_count
  
  if __name__ == '__main__':
      fptr = open(os.environ['OUTPUT_PATH'], 'w')
  
      n = int(input())
  
      arr = list(map(int, input().rstrip().split()))
  
      result = cutTheSticks(arr)
  
      fptr.write('\n'.join(map(str, result)))
      fptr.write('\n')
  
      fptr.close()
  