main(k,p,q)char*p,*q;{for(;gets(p=q);)for(;k<*q%4?*p%8||--k||printf("(",*p=32):putchar(*q++?:10,p=q,k=1)-10;)*++p%41||k++;}