#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  bool print = false;
  vector<vector<char>> bus;
  bool found = false;
  for (int i = 0; i < n; i++) {
    vector<char> row;
    char a, b, c, d, e;
    cin >> a >> b >> c >> d >> e;
    row.push_back(a);
    row.push_back(b);
    row.push_back(c);
    row.push_back(d);
    row.push_back(e);
    if ((!found) && ((a == 'O' && b == 'O') || (d == 'O' && e == 'O'))) {
      print = true;
      if ((a == 'O' && b == 'O')) {
        row[0] = '+';
        row[1] = '+';
      } else if ((d == 'O' && e == 'O')) {
        row[3] = '+';
        row[4] = '+';
      }
      found = true;
    }
    bus.push_back(row);
  }
  if (print) {
    cout << "YES" << endl;
    for (int i = 0; i < bus.size(); i++) {
      for (int j = 0; j < bus[i].size(); j++) {
        cout << bus[i][j];
      }
      cout << endl;
    }
  } else {
    cout << "NO";
  }
}
