Language: C

b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
    1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 'o' [-Wimplicit-int]
    1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
      |     ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
    1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
      |       ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
      |                   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
      |                   ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:74: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
      |                                                                          ^~~~~~
main.c:1:74: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:74: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:74: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:105: error: lvalue required as left operand of assignment
    1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
      |                                                                                                         ^~
main.c:1:110: error: expected ')' before ':' token
    1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
      |                  ~                                                                                           ^
      |                                                                                                              )
main.c:1:128: error: expected expression before '}' token
    1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+=b>3?b-3:0)):!s+=++b:o=(o+!(a%3-2))%3;}
      |                                                                                                                                ^