
loop do
    n = gets.to_i
    break if n == 0
    s = gets
    hand = Array.new(n, 0)
    field = 0
    s.each_char.with_index do |c, k|
        k = k % n
        if c == "S"
            field += hand[k] + 1
            hand[k] = 0
        elsif c == "L"
            hand[k] += field + 1
            field = 0
        elsif c == "M"
            hand[k] += 1
        end
    end
    puts (hand.sort + [field]).join(" ")
end