while 1:

  n=int(eval(input()))

  if n==0: break

  cs=eval(input())

  a,b=[0]*n,0

  for i in range(100):

    if cs[i]=="M":

      a[i%n]+=1

    elif cs[i]=="S":

      a[i%n],b=0,b+1+a[i%n]

    elif cs[i]=="L":

      a[i%n],b=a[i%n]+1+b,0

  a.sort()

  print((" ".join(map(str,a+[b]))))
while 1:

  n=int(eval(input()))

  if n==0: break

  a,b,i=[0]*n,0,0

  for c in eval(input()):

    if c=="M": a[i]+=1

    elif c=="S": a[i],b=0,b+1+a[i]

    elif c=="L": a[i],b=a[i]+1+b,0

    i=(i+1)%n

  a.sort()

  print((" ".join(map(str,a+[b]))))
while 1:
    n = int(eval(input()))
    if n == 0:
        break
    cs = eval(input())
    a, b = [0] * n, 0
    for i in range(100):
        if cs[i] == "M":
            a[i % n] += 1
        elif cs[i] == "S":
            a[i % n], b = 0, b + 1 + a[i % n]
        elif cs[i] == "L":
            a[i % n], b = a[i % n] + 1 + b, 0
    a.sort()
    print((" ".join(map(str, a + [b]))))

while 1:
    n = int(eval(input()))
    if n == 0:
        break
    a, b, i = [0] * n, 0, 0
    for c in eval(input()):
        if c == "M":
            a[i] += 1
        elif c == "S":
            a[i], b = 0, b + 1 + a[i]
        elif c == "L":
            a[i], b = a[i] + 1 + b, 0
        i = (i + 1) % n
    a.sort()
    print((" ".join(map(str, a + [b]))))

-    cs = eval(input()) -    a, b = [0] * n, 0 -    for i in range(100): -        if cs[i] == "M": -            a[i % n] += 1 -        elif cs[i] == "S": -            a[i % n], b = 0, b + 1 + a[i % n] -        elif cs[i] == "L": -            a[i % n], b = a[i % n] + 1 + b, 0 +    a, b, i = [0] * n, 0, 0 +    for c in eval(input()): +        if c == "M": +            a[i] += 1 +        elif c == "S": +            a[i], b = 0, b + 1 + a[i] +        elif c == "L": +            a[i], b = a[i] + 1 + b, 0 +        i = (i + 1) % n