for(r=readline;s=r();print())for(i in t=r())putstr(" -_"[s[i]|t[i]*2])