fun main(args:Array<String>?): Unit {
    while(true){
        val n = readLine()!!.trim().toInt()
        if (n == 0) return
        val state = readLine()!!.trim()
        var field = 0
        val players = IntArray(n){0}
        for ((i, c) in state.withIndex()){
            when(c){
                'M' -> players[i % n]++
                'S' -> {
                    field += players[i % n] + 1
                    players[i % n] = 0
                }
                'L' -> {
                    players[i % n] += field + 1
                    field = 0
                }
                else -> TODO()
            }
        }
        println("${players.sorted().joinToString(" ")} $field")
    }
}
