ZS the Coder and Chris the Baboon are travelling to Udayland! To get there, they have to get on the special IOI bus. The IOI bus has n rows of seats. There are 4 seats in each row, and the seats are separated into pairs by a walkway. When ZS and Chris came, some places in the bus was already occupied.

ZS and Chris are good friends. They insist to get a pair of neighbouring empty seats. Two seats are considered neighbouring if they are in the same row and in the same pair. Given the configuration of the bus, can you help ZS and Chris determine where they should sit?


-----Input-----

The first line of the input contains a single integer n (1 ≤ n ≤ 1000) — the number of rows of seats in the bus.

Then, n lines follow. Each line contains exactly 5 characters, the first two of them denote the first pair of seats in the row, the third character denotes the walkway (it always equals '|') and the last two of them denote the second pair of seats in the row. 

Each character, except the walkway, equals to 'O' or to 'X'. 'O' denotes an empty seat, 'X' denotes an occupied seat. See the sample cases for more details. 


-----Output-----

If it is possible for Chris and ZS to sit at neighbouring empty seats, print "YES" (without quotes) in the first line. In the next n lines print the bus configuration, where the characters in the pair of seats for Chris and ZS is changed with characters '+'. Thus the configuration should differ from the input one by exactly two charaters (they should be equal to 'O' in the input and to '+' in the output).

If there is no pair of seats for Chris and ZS, print "NO" (without quotes) in a single line.

If there are multiple solutions, you may print any of them.


-----Examples-----
Input
6
OO|OX
XO|XX
OX|OO
XX|OX
OO|OO
OO|XX

Output
YES
++|OX
XO|XX
OX|OO
XX|OX
OO|OO
OO|XX

Input
4
XO|OX
XO|XX
OX|OX
XX|OX

Output
NO

Input
5
XX|XX
XX|XX
XO|OX
XO|OO
OX|XO

Output
YES
XX|XX
XX|XX
XO|OX
XO|++
OX|XO



-----Note-----

Note that the following is an incorrect configuration for the first sample case because the seats must be in the same pair.

O+|+X

XO|XX

OX|OO

XX|OX

OO|OO

OO|XX

Difficulty: interview

Starter code:

Solutions:
#!/usr/bin/env python3

def main():
    try:
        while True:
            n = int(input())
            grid = [input() for i in range(n)]
            for i, row in enumerate(grid):
                if row[:2] == "OO":
                    grid[i] = "++" + row[2:]
                    break
                elif row[-2:] == "OO":
                    grid[i] = row[:-2] + "++"
                    break
            else:
                print("NO")
                continue

            print("YES")
            print('\n'.join(grid))

    except EOFError:
        pass

main()


n = int(input())
arr = []
for i in range(n):
    arr.append(input())

suc = 0
for i in range(n):
    x = arr[i]
    if(x[0:2]=='OO'):
        suc = 1
        arr[i] = '++'+x[2:]
        break
    if(x[3:5]=='OO'):
        suc = 1
        arr[i] = x[:3]+'++'
        break
if(suc):
    print('YES')
    for x in arr:
        print(x)
else:
    print('NO')

# You lost the game.
n = int(input())
S = [str(input()) for _ in range(n)]
ok = -1
r = -1
for i in range(n):
    if S[i][0] == "O" and S[i][1] == "O":
        ok = 1
        r = i
        break
    elif S[i][3] == "O" and S[i][4] == "O":
        ok = 2
        r = i
        break
if r == -1:
    print("NO")
else:
    print("YES")
    for i in range(n):
        if r == i:
            if ok == 1:
                print("++|"+S[i][3]+S[i][4])
            else:
                print(S[i][0]+S[i][1]+"|++")
        else:
            print(S[i])


n = int(input())
res = []
fl = True
for i in range(n):
    line = input()
    if 'OO' in line and fl:
        fl = False
        line = line.split('|')
        if line[0] == 'OO':
            line[0] = '++'
        else:
            line[1] = '++'
        res.append(line[0]+'|'+line[1])
    else:
        res.append(line)
if not fl:
    print('YES')
    for i in res:
        print(i)
else:
    print('NO')

from sys import stdin

n=int(input())
bus=[]
possible=False
for i in range(n):
    rangee=list(input())
    if not possible and rangee[0]=='O' and rangee[1]=='O':
        possible=True
        rangee[0]='+'
        rangee[1]='+'
    elif not possible and rangee[-1]=='O' and rangee[-2]=='O':
        possible=True
        rangee[-1]='+'
        rangee[-2]='+'
    bus.append(rangee)

if possible:
    print("YES")
    for i in range(n):
        print(*bus[i],sep="")
else:
    print("NO")


import sys, math
n = int(input())
ans = []
flag = 0
for i in range(n):
    z = input()
    if not flag:
        if z[0] == 'O' and z[1] == 'O':
            z = '++' + z[2:]
            flag = 1
        elif z[3] == 'O' and z[4] == 'O':
            z = z[:3] + '++'
            flag = 1
    ans.append(z)
if not flag:
    print('NO')
else:
    print('YES')
    for i in range(n):
        print(ans[i])
            


n = int(input())
seat = []
for nn in range(n):
    seat.append(input())

ok = False

for i in range(n):
    a,b = seat[i].split('|')
    if ok is False:
        if a == 'OO':
            a = '++'
            ok = True
        elif b == 'OO':
            b = '++'
            ok = True
    seat[i] = a + '|' + b

if ok is False:
    print('NO')
    return
else:
    print('YES')
    print('\n'.join(seat))

n = int(input())

l = []
for i in range(n):
	s = input().rstrip().lstrip()
	l.append(s)

for i in range(n):
	s = l[i]
	ind = s.find('OO')
	if ind != -1:
		s = list(s)
		s[ind] = '+'
		s[ind + 1] = '+'
		l[i] = ''.join(s)
		print('YES')
		print('\n'.join(l))
		return
print('NO')


N = int(input())
rows = []
for i in range(N):
    rows.append(input().split("|"))
flg = False
for i, row in enumerate(rows):
    if row[0] == "OO":
        rows[i][0] = "++"
        flg = True
    elif row[1] == "OO":
        rows[i][1] = "++"
        flg = True
    if flg:
        break
if not flg:
    print("NO")
else:
    print("YES")
    for row in rows:
        print("{}|{}".format(row[0], row[1]))


n = int(input())
k = []
a = 0
for i in range(n):
	s = input()
	if s[0] == "O" and s[1] == "O" and a == 0:
		a = 1
		k.append("++"+s[2:])
	elif s[3] == "O" and s[4] == "O" and a == 0:
		a = 1
		k.append(s[:-2]+ "++")
	else:
		k.append(s)
if a:
	print("YES")
	for i in range(n):
		print(k[i])
else:
	print("NO")


n = int(input())
a = []
for _ in range(n):
    a.append(list(input()))

flag = 0
for i in range(n):
    for j in range(1,5):
        if a[i][j]=="O" and a[i][j-1]=="O":
            a[i][j] = "+"
            a[i][j-1] = "+"
            flag =1
            break
    if flag:
        break

if flag:
    print("YES")
    for i in range(n):
        print("".join(str(x) for x in a[i]))
else:
    print("NO")

s = '\n'.join([input() for _ in range(int(input()))])
ns = s.replace('OO', '++', 1)
print('YES\n' + ns if ns != s else 'NO')


n = int(input())
bus = [input() for x in range(n)]

if 'OO' in ' '.join(bus):
	print('YES')
	found = False
	for line in bus:
		if 'OO' in line and not found:
			found = True
			if line[:2] == 'OO':
				print('++' + line[2:])
			else:
				print(line[:3] + '++')
		else:
			print(line)
else:
	print('NO')

n = int(input())
line = []
result = False
for i in range(n):
    string = input()
    if not result:
        if string[0] == "O" and string[1] == "O":
            string = "++" + string[2:]
            line += [string]
            result = True
        elif string[3] == "O" and string[4] == "O":
            string = string[:3]+ "++"
            line += [string]
            result = True  
        else:
            line += [string]
    else:
        line += [string]        
if not result:
    print("NO")
else:    
    print("YES")
    for i in range(n):
        print(line[i])

n=int(input())
ip=[]
op=[]
b=0
for i in range(n):
    s=str(input().split())
    ip.append(s)
    if 'OO' in s and b==0:
        j=s.index('OO')
        s=s[:j]+'++'+s[j+2:]
        b=1
    op.append(s)
if b==0:
    print('NO')
else:
    print('YES')
    for i in op:
        print(i[2:7])
        


#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import time

n       = int(input())
bus     = []
flag    = True

for i in range(n):
    x = list(input())
    if flag:
        if x[0] == 'O' and x[1] == 'O':
            x[0] = '+'
            x[1] = '+'
            flag = False
        elif x[3] == 'O' and x[4] == 'O':
            x[3] = '+'
            x[4] = '+'
            flag = False
    bus.append(x)
start = time.time()

if flag:
    print('NO')
else:
    print('YES')
    for i in range(n):
        for j in bus[i]:
            print(j, end='')
        print()
finish = time.time()
#print(finish - start)


#!/usr/bin/env python3

n = int(input())
s = [input() for _ in range(n)]
for i, r in enumerate(s):
    if "OO" in r:
        s[i] = r.replace("OO", "++", 1)
        print("YES")
        print("\n".join(s))        
        break
else:
    print("NO")
        


n = int(input())
config = []
for i in range(n):
    config.append(list(input()))
canSit = False
for i in range(n):
    if canSit:
        continue
    else:
        a, b, c, d, e = config[i]
        if a == 'O' and b == 'O':
            canSit = True
            ans = (i, 1, 2)
        elif d == 'O' and e == 'O':
            canSit = True
            ans = (i, 4, 5)
        else:
            continue
if not canSit:
    print("NO")
else:
    print("YES")
    config[ans[0]][ans[1] - 1] = '+'
    config[ans[0]][ans[2] - 1] = '+'
    for row in config:
        print(''.join(row))


n = int(input())
tg = False
st = ""
for i in range(n):
    s = input()
    if "OO" in s and not tg:
        tg = True
        if s == "OO|OO":
            s = "++|OO"
        else:
            s = s.replace("OO", "++")
    st += s + "\n"
print("YES" if tg else "NO")
if tg:
    print(st)


inp = int(input())
res = []
flag = 0
for i in range (inp):
    stroke = input()
    stroke = stroke.split('|')
    if (stroke[0] == 'OO') & (flag == 0):
        stroke[0] = '++'
        flag = 1
    elif (stroke[1] == 'OO') & (flag == 0):
        stroke[1] = '++'
        flag = 1
    res.append(stroke[0] + '|' + stroke[1])
if flag == 1:
    print('YES')
    for i in res:
        print(i)
else:
    print('NO')



n = int(input())

l = [[c for c in input()] for _ in range(n)]

ok = False
for r in l:
    if r[0] == r[1] == 'O':
        r[0] = r[1] = '+'
        ok = True
        break
    if r[3] == r[4] == 'O':
        r[3] = r[4] = '+'
        ok = True
        break

if ok:
    print('YES')
    for r in l:
        print(''.join(r))
else:
    print('NO')
    


from sys import stdin as fin
# fin = open("cfr369a.in")

n = int(fin.readline())
flag = False
out = []
for i in range(n):
    l, r = fin.readline().strip().split('|')
    if not flag and l == 'OO':
        flag = True
        l = '++'
    elif not flag and r == 'OO':
        flag = True
        r = '++'
    out.append(l + '|' + r)
if flag:
    print("YES")
    print('\n'.join(out))
else:
    print("NO")

n = int(input())
a = [input() for i in range(n)]
ans = False
for i in range(n):
    if ((a[i][0] == "O" and a[i][1] == "O") and not ans):
        a[i] = "++" + a[i][2:]
        ans = True
        continue
    if ((a[i][3] == "O" and a[i][4] == "O")and not ans):
        a[i] = a[i][:3] + "++"
        ans = True
        continue
if (ans):
    print("YES")
    for i in range(n):
        print(a[i])
else:
    print("NO")

n = int(input())
seats = []
ans = ""
for i in range(n):
    s = input()
    ss = s.split("|")
    s1 = ss[0]
    if ans == "" and ss[0] == "OO":
        ans = "YES"
        s1 = "++"
    s2 = ss[1]
    if ans == "" and ss[1] == "OO":
        ans = "YES"
        s2 = "++"
    seats.append(s1 + "|" + s2)

if ans != "":
    print(ans)
    print("\n".join(seats))
else:
    print("NO")


n = int(input())
b = True
ans = False
A = []
for i in range(n):
	s = input()
	if s[0] == 'O' and s[1] == 'O' and b:
		A.append("++|{0}{1}".format(s[3], s[4]))
		b = False
		ans = True
	elif 	s[3] == 'O' and s[4] == 'O' and b:
		A.append("{0}{1}|++".format(s[0], s[1]))
		b = False
		ans = True
	else:
		A.append(s)	
if ans:
	print("YES")
	for i in A:
		print(i)
else:
	print("NO")