import re,os a=os.read(0,109).replace(*'o-') for d in range(20):d/=2;a=re.sub('x|\.(?=(|[^z]{10})%s)'%~-d,`d`,a[::-1]) print a