N = gets.to_i
array=gets.chomp.split(" ").map(&:to_i)

grouped = array.group_by {|e| e }.map {|key,val| val.length }.sort

(1..N).each do |i|
    if grouped.length < i
        puts 0
        next
    end

    if grouped.length == i
        puts grouped[0]
        next
    end

    if i == 1
        puts N
        next
    end



    gg = grouped.dup
    ret = 0
    loop do
        ret += gg[-i]
        (1..i).each {|index| gg[gg.length-index] -= gg[-i] }
        gg.delete(0)
        if gg.length < i
            break
        end
    
        if gg.length == i
            gg.min
            break
        end
        gg = gg.sort
    end
    puts ret
end