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