while true
    n = gets.to_i
    break if n == 0
    arr = Array.new(n, 0)
    turn = 0
    ba = 0
    cards = gets.chomp.split("")
    cards.each{|card|
        arr[turn] += 1
        case card
        when "S"
            ba += arr[turn]
            arr[turn] = 0
        when "L"
            arr[turn] += ba
            ba = 0
        end
        turn = (turn + 1) % n
    }
    arr.sort!
    arr << ba
    puts arr.join(" ")
end
