#include <bits/stdc++.h>
using namespace std;
int main() {
  int s, f = 0, p, p1, p2;
  cin >> s;
  char a[s][5];
  for (int i = 0; i < s; i++) {
    cin >> a[i][0] >> a[i][1] >> a[i][2] >> a[i][3] >> a[i][4];
    if (a[i][0] == 'O' && a[i][1] == 'O') {
      f = 1;
      p = i;
      p1 = 0;
      p2 = 1;
    } else if (a[i][3] == 'O' && a[i][4] == 'O') {
      f = 1;
      p = i;
      p1 = 3;
      p2 = 4;
    }
  }
  if (f == 0)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 0; i < s; i++) {
      if (i == p) {
        if (p1 == 0)
          cout << "++|" << a[i][3] << a[i][4] << endl;
        else
          cout << a[i][0] << a[i][1] << "|++" << endl;
      } else
        cout << a[i][0] << a[i][1] << a[i][2] << a[i][3] << a[i][4] << endl;
    }
  }
}
