#include #include #define C case #define G getchar() #define P printf #define B break #define A char A*F="%c";int l=0;void I(){int i=l;P("\n");while(i-->0)P("\t");}void U(A c,A t){P(F,c);c=G;while(c!=t&&c!=EOF){P(F,c);if(c=='\\')P(F,G);c=G;}P(F,t);}int main(int q,A**v){A c;int N=0,H=0;c=G;while(c!=EOF){switch(c){C'{':l++;if(l==1)P("\n{");else if(H)P("{");else P(" {");N=1;B;C'}':l--;I();P("}");if(l==0)P("\n");N=1;B;C'\n':C'\t':C'\r':C' ':while(isspace(c=G));ungetc(c,stdin);c=' ';P(" ");B;C'\'':C'"':U(c,c);B;C'#':U('#','\n');N=1;B;C';':C':':P(F,c);N=1;B;default:if(N)I(),N=0;P(F,c);}H=isspace(c);c=G;}P("\n");return 0;}