f=0 while""do i=io.read(1)if f==0 then o=i else o="*"end if i:match("[()]") then f=(f+1)%2 o=i end io.write(o)end