#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<string> arr;
  int t;
  int k = 1;
  cin >> t;
  int c = 0;
  while (k <= t) {
    k++;
    string s;
    cin >> s;
    if ((s.at(0) == 'O' && s[1] == 'O')) {
      if (c == 0) {
        s[0] = '+';
        s[1] = '+';
        c = 1;
      }
    }
    if (c == 0) {
      if ((s[3] == 'O' && s[4] == 'O')) {
        s[3] = '+';
        s[4] = '+';
        c = 1;
      }
    }
    arr.push_back(s);
  }
  if (c == 1) {
    cout << "YES"
         << "\n";
    for (int i = 0; i < arr.size(); i++) cout << arr[i] << "\n";
  } else {
    cout << "NO"
         << "\n";
  }
}
