until (n=gets.to_i) == 0 do
  card = Array.new(n, 0)
  field = 0
  turn = 0
  gets.chop.chars.each do |c|
    case c
      when "M"
        card[turn] += 1
      when "S"
        field += card[turn] + 1
        card[turn] = 0
      when "L"
        card[turn] += field + 1
        field = 0
    end
    turn = (turn+1)%n
  end
  puts [*card.sort, field]*" "
end