Language: C

a[11],j;main(N,i){for(;scanf("%d",&N),j=N;memset(a,0,sizeof(a))){
    for(getchar(),i=0;(j=getchar())!='\n';i++)if(j=='M')a[i%N]++;else if(j-'L')a[N]+=a[i%N]+1,a[i%N]=0;else a[i%N]+=a[N]+1,a[N]=0;
    for(i=0;i<N;printf("%d ",a[i++])for(j=N-1;j>i;j--)if(a[j]<a[j-1])a[j-1]^=a[j],a[j]^=a[j-1],a[j-1]^=a[j];
    printf("%d\n",a[N]);
}}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a[11],j;main(N,i){for(;scanf("%d",&N),j=N;memset(a,0,sizeof(a))){
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:7: error: type defaults to 'int' in declaration of 'j' [-Wimplicit-int]
    1 | a[11],j;main(N,i){for(;scanf("%d",&N),j=N;memset(a,0,sizeof(a))){
      |       ^
main.c:1:9: error: return type defaults to 'int' [-Wimplicit-int]
    1 | a[11],j;main(N,i){for(;scanf("%d",&N),j=N;memset(a,0,sizeof(a))){
      |         ^~~~
main.c: In function 'main':
main.c:1:9: error: type of 'N' defaults to 'int' [-Wimplicit-int]
main.c:1:9: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:1:24: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | a[11],j;main(N,i){for(;scanf("%d",&N),j=N;memset(a,0,sizeof(a))){
      |                        ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | a[11],j;main(N,i){for(;scanf("%d",&N),j=N;memset(a,0,sizeof(a))){
main.c:1:24: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | a[11],j;main(N,i){for(;scanf("%d",&N),j=N;memset(a,0,sizeof(a))){
      |                        ^~~~~
main.c:1:24: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:43: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
    1 | a[11],j;main(N,i){for(;scanf("%d",&N),j=N;memset(a,0,sizeof(a))){
      |                                           ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'memset'
  +++ |+#include <string.h>
    1 | a[11],j;main(N,i){for(;scanf("%d",&N),j=N;memset(a,0,sizeof(a))){
main.c:1:43: warning: incompatible implicit declaration of built-in function 'memset' [-Wbuiltin-declaration-mismatch]
    1 | a[11],j;main(N,i){for(;scanf("%d",&N),j=N;memset(a,0,sizeof(a))){
      |                                           ^~~~~~
main.c:1:43: note: include '<string.h>' or provide a declaration of 'memset'
main.c:2:9: error: implicit declaration of function 'getchar' [-Wimplicit-function-declaration]
    2 |     for(getchar(),i=0;(j=getchar())!='\n';i++)if(j=='M')a[i%N]++;else if(j-'L')a[N]+=a[i%N]+1,a[i%N]=0;else a[i%N]+=a[N]+1,a[N]=0;
      |         ^~~~~~~
main.c:2:9: note: 'getchar' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:3:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    3 |     for(i=0;i<N;printf("%d ",a[i++])for(j=N-1;j>i;j--)if(a[j]<a[j-1])a[j-1]^=a[j],a[j]^=a[j-1],a[j-1]^=a[j];
      |                 ^~~~~~
main.c:3:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:3:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:37: error: expected ')' before 'for'
    3 |     for(i=0;i<N;printf("%d ",a[i++])for(j=N-1;j>i;j--)if(a[j]<a[j-1])a[j-1]^=a[j],a[j]^=a[j-1],a[j-1]^=a[j];
      |        ~                            ^~~
      |                                     )
main.c:5:1: error: expected expression before '}' token
    5 | }}
      | ^