#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  int n, d = 0;
  ;
  cin >> n;
  char a[n][5];
  for (int i = 0; i < n; i++) {
    cin >> a[i][0] >> a[i][1] >> a[i][2] >> a[i][3] >> a[i][4];
  }
  for (int i = 0; i < n; i++) {
    if (a[i][0] == 'O' && a[i][1] == 'O') {
      a[i][0] = '+';
      a[i][1] = '+';
      d++;
      break;
    }
    if (a[i][3] == 'O' && a[i][4] == 'O') {
      a[i][3] = '+';
      a[i][4] = '+';
      d++;
      break;
    }
  }
  if (d == 0)
    cout << "NO";
  else {
    cout << "YES\n";
    for (int i = 0; i < n; i++)
      cout << a[i][0] << a[i][1] << a[i][2] << a[i][3] << a[i][4] << "\n";
  }
  return 0;
}
