#include <bits/stdc++.h>
using namespace std;
int main() {
  int k, c = 1, m;
  cin >> k;
  string *po = new string[k];
  for (int i = 0; i <= k - 1; i++) {
    cin >> po[i];
    if (c) {
      if (po[i][0] == 'O' && po[i][1] == 'O') {
        c = 0;
        m = i;
        po[i][0] = '+';
        po[i][1] = '+';
      } else if (po[i][3] == 'O' && po[i][4] == 'O') {
        c = 0;
        m = i;
        po[i][3] = '+';
        po[i][4] = '+';
      }
    }
  }
  if (c)
    cout << "NO";
  else {
    cout << "YES" << endl;
    for (int i = 0; i <= k - 1; i++) {
      cout << po[i] << endl;
    }
  }
}
