char*p,*q;main(c,b){for(gets(b);p&&(printf(*q++?"(%c%c%c)":"\n",*p,c,*q)<2?q=b,*++p:1)||(c=getchar(p=q=b))>10;);}