import itertools,sys
L=list
C=itertools.count
d=L(map(L,filter(None,sys.stdin.read().split('\n'))))
X=len(d[0])
Y=len(d)
R=range
def P(r):return all(d[y][x]=='.'for x,y in r)
def S(f):
for n in C(0):
if P(f(n)):l=n
else:break
for n in C(l+1):
if P(f(n)):return l,n
def f(V,a,*b):return L(eval('lambda '+a+':('+i+')',V)for i in b)
V=locals()
def D(n):
y=min(n,Y-1);x=n-y
while y>=0and x<X:
yield(x,y);x+=1;y-=1
def E(n):
x=max(0,n-Y);y=x+Y-n
while y<Y and x<X:yield(x,y);x+=1;y+=1
F=f(V,'p','(p,y)for y in R(0,Y)','(x,p)for x in R(0,X)')+[D,E]
r=f(V,'x,y','x','y','x+y','x-y+Y')
B=L(map(S,F))
for x in R(0,X):
for y in R(0,Y):
z=L(zip(r,B))
if all(g(x,y)in R(a,b+1)for g,(a,b)in z)and any(g(x,y)in e for g,e in z):d[y][x]='o'
print('\n'.join(''.join(x)for x in d))
aW1wb3J0IGl0ZXJ0b29scyxzeXMKTD1saXN0CkM9aXRlcnRvb2xzLmNvdW50CmQ9TChtYXAoTCxmaWx0ZXIoTm9uZSxzeXMuc3RkaW4ucmVhZCgpLnNwbGl0KCdcbicpKSkpClg9bGVuKGRbMF0pClk9bGVuKGQpClI9cmFuZ2UKZGVmIFAocik6cmV0dXJuIGFsbChkW3ldW3hdPT0nLidmb3IgeCx5IGluIHIpCmRlZiBTKGYpOgoJZm9yIG4gaW4gQygwKToKCQlpZiBQKGYobikpOmw9bgoJCWVsc2U6YnJlYWsKCWZvciBuIGluIEMobCsxKToKCQlpZiBQKGYobikpOnJldHVybiBsLG4KZGVmIGYoVixhLCpiKTpyZXR1cm4gTChldmFsKCdsYW1iZGEgJythKyc6KCcraSsnKScsVilmb3IgaSBpbiBiKQpWPWxvY2FscygpCmRlZiBEKG4pOgoJeT1taW4obixZLTEpO3g9bi15Cgl3aGlsZSB5Pj0wYW5kIHg8WDoKCQl5aWVsZCh4LHkpO3grPTE7eS09MQpkZWYgRShuKToKCXg9bWF4KDAsbi1ZKTt5PXgrWS1uCgl3aGlsZSB5PFkgYW5kIHg8WDp5aWVsZCh4LHkpO3grPTE7eSs9MQpGPWYoViwncCcsJyhwLHkpZm9yIHkgaW4gUigwLFkpJywnKHgscClmb3IgeCBpbiBSKDAsWCknKStbRCxFXQpyPWYoViwneCx5JywneCcsJ3knLCd4K3knLCd4LXkrWScpCkI9TChtYXAoUyxGKSkKZm9yIHggaW4gUigwLFgpOgoJZm9yIHkgaW4gUigwLFkpOgoJCXo9TCh6aXAocixCKSkKCQlpZiBhbGwoZyh4LHkpaW4gUihhLGIrMSlmb3IgZywoYSxiKWluIHopYW5kIGFueShnKHgseSlpbiBlIGZvciBnLGUgaW4geik6ZFt5XVt4XT0nbycKcHJpbnQoJ1xuJy5qb2luKCcnLmpvaW4oeClmb3IgeCBpbiBkKSk=