Title: The Conclusion of "Bouzu Mekuri"

In the game using the cards from the Hyakunin Isshu, there is a game called "Bouzu Mekuri" which uses picture cards and is widely enjoyed due to its simplicity. While there are various derivative types, the Bouzu Mekuri we consider here involves N participants and follows the rules below:

- 64 "men", 15 "bouzu", and 21 "hime" cards, totaling 100 cards, are used.
- The cards are shuffled with their backs facing up to create a "card mountain" so that the pictures are not visible.
- Participants draw one card at a time from the card mountain in order, starting from the first person. After the Nth person, the cycle repeats from the first person.
  - If the drawn card is a "man", the person who drew it keeps the card.
  - If the drawn card is a "bouzu", the person who drew it, along with all the cards they have, places them in the "field".
  - If the drawn card is a "hime", the person who drew it, along with all the cards in the field, collects them.
- The game ends when there are no more cards in the card mountain, and the person with the most cards wins.

Given the number of participants and the order of cards in the card mountain, create a program that outputs the number of cards held by each participant in ascending order at the end of the game, as well as the number of cards remaining in the field.

Input:
The input consists of multiple datasets. The end of the input is indicated by a single line containing zero. Each dataset is given in the following format:
- N (an integer representing the number of participants, where 2 ≤ N ≤ 10) on the first line.
- A string representing the order of cards in the card mountain on the second line. Each character c_i represents the i-th drawn card, where M represents "man", S represents "bouzu", and L represents "hime". There are no spaces between the characters.

The number of datasets does not exceed 100.

Output:
For each dataset, output the sequence of card numbers at the end of the game on one line. The sequence of card numbers should be followed by the number of cards remaining in the field. Separate each card number with a single space. Do not output a space at the end of the line.

Sample Input:
2
SSSSSSSSSSSSSSSLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
2
SSSSSSSSSSSSSSLLLLLLLLLLLLLLLLLLLLMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMSL
5
MMMMMMSLSLLMMMSMMSLMMMLMMMMLSLLLLMLSMMLMMLLMSSSLMMMMLMLSMLMSMMMMMMMSMMMMMMLMMMMMSMMMLMMLMMMMMMMMMSSM
0

Sample Output:
42 58 0
0 100 0
0 0 3 10 59 28

# Buggy version:
while 1:
    ba = 0

    p = [0 for i in range(int(input()))]
    if len(p) == 0:break

    for i,v in enumerate(list(input())):
        p[i%len(p)] += 1
        if v == 'L':
            p[i%len(p)] += ba
            ba = 0
        elif v== 'S':
            ba += p[i%len(p)] 
            p[i%len(p)] = 0

    result = ''
    for v in p:
       result +=  '%d ' % v
    result += str(ba)
    print(result)

# Fixed version:
while 1:
    ba = 0

    p = [0 for i in range(int(input()))]
    if len(p) == 0:break

    for i,v in enumerate(list(input())):
        p[i%len(p)] += 1
        if v == 'L':
            p[i%len(p)] += ba
            ba = 0
        elif v== 'S':
            ba += p[i%len(p)] 
            p[i%len(p)] = 0

    result = ''
    for v in sorted(p):
       result +=  '%d ' % v
    result += str(ba)
    print(result)

# Buggy version:
while 1:
    n = int(input())
    if n == 0:break
    p = [0] * n
    s = 0
    f = input()
    for i in range(100):
        if f[i] == "M":p[i % n] += 1
        elif f[i] == "S":
            s += p[i % n] + 1
            p[i % n] = 0
        else:
            p[i % n] += s + 1
            s = 0
    p += [s]
    print(*p)


# Fixed version:
while 1:
    n = int(input())
    if n == 0:break
    p = [0] * n
    s = 0
    f = input()
    for i in range(100):
        if f[i] == "M":p[i % n] += 1
        elif f[i] == "S":
            s += p[i % n] + 1
            p[i % n] = 0
        else:
            p[i % n] += s + 1
            s = 0
    p.sort()
    p += [s]
    print(*p)