#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;
	}
	
	
}























