#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <math.h>
#define lli long long int
using namespace std;
int main(){
int n;
cin >> n;
string s[1000];
string word;
bool check = false;
bool done = false;
for(int i = 1; i <= n; i++){
cin >> word;
s[i] = word;
if(s[i][0] == s[i][1] && s[i][0] == 'O' || s[i][3] == s[i][4] && s[i][3] == 'O' && !done){
if(s[i][0] == s[i][1]){
s[i][0] = '+';
s[i][1] = '+';
check = true;
}
else{
s[i][3] = '+';
s[i][4] = '+';
check = true;
}
done = true;
}
}
if(check){
cout << "YES" << endl;
for(int i = 1; i <= n; i++){
cout << s[i] << endl;
}
}
else{
cout << "NO" << endl;
}
}
I2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPGxpc3Q+CiNpbmNsdWRlIDxtYXA+CiNpbmNsdWRlIDxzZXQ+CiNpbmNsdWRlIDxxdWV1ZT4KI2luY2x1ZGUgPGRlcXVlPgojaW5jbHVkZSA8c3RhY2s+CiNpbmNsdWRlIDxiaXRzZXQ+CiNpbmNsdWRlIDxhbGdvcml0aG0+CiNpbmNsdWRlIDxmdW5jdGlvbmFsPgojaW5jbHVkZSA8bnVtZXJpYz4KI2luY2x1ZGUgPHV0aWxpdHk+CiNpbmNsdWRlIDxzc3RyZWFtPgojaW5jbHVkZSA8aW9zdHJlYW0+CiNpbmNsdWRlIDxpb21hbmlwPgojaW5jbHVkZSA8Y3N0ZGlvPgojaW5jbHVkZSA8Y21hdGg+CiNpbmNsdWRlIDxjc3RkbGliPgojaW5jbHVkZSA8Y3RpbWU+CiNpbmNsdWRlIDxjc3RyaW5nPgojaW5jbHVkZSA8bWF0aC5oPiAKI2RlZmluZSBsbGkgbG9uZyBsb25nIGludAoKCgp1c2luZyBuYW1lc3BhY2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