char*p,*q;main(f,c){for(q=p;~-f?c--:gets(p=c);p+=*p<49)for(*p*f&&main(0,2),printf("(\n())"+2*f);*q;f=3-f%2)*q++=f%3*5+(f=*q)+48>>1;}