#include <bits/stdc++.h>
using namespace std;
int main() {
  char m[1000][6];
  int n;
  cin >> n;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < 5; j++) cin >> m[i][j];
  int i;
  for (i = 0; i < n; i++) {
    if ((m[i][0] == 'O' && m[i][0] == m[i][1]) ||
        (m[i][3] == 'O' && m[i][3] == m[i][4])) {
      if (m[i][0] == 'O' && m[i][0] == m[i][1]) {
        m[i][0] = '+';
        m[i][1] = '+';
      } else {
        m[i][3] = '+';
        m[i][4] = '+';
      }
      break;
    }
  }
  if (i != n) {
    cout << "YES\n";
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < 5; j++) cout << m[i][j];
      cout << endl;
    }
  } else
    cout << "NO\n";
  return 0;
}
