for(;s=readline(p=d='');print(v[0]))for(i in s)i%2?d='\\'+-~i/2+d:p+='(.)',v=s.match(p+d)||v