char*p;f(){*--p%2?f(),f(*--p=32),bcopy(p,p+1,99),*p=40:0;}main(i,s){for(;p=index(s,!gets(s));puts())f();}