s;char*p=&s;main(n){for(strcat(gets(p+3)," ");p[3];putchar("# "[n%7&&n-17|*p%2]))n=(*(int*)p++>>8)%85;}