#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[4][1001], no;
  int n;
  bool flag = false;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[0][i] >> a[1][i] >> no >> a[2][i] >> a[3][i];
  }
  for (int i = 1; i <= n; i++)
    if (a[0][i] == a[1][i] && a[0][i] == 'O') {
      flag = true;
      a[0][i] = a[1][i] = '+';
      break;
    } else if (a[2][i] == a[3][i] && a[2][i] == 'O') {
      flag = true;
      a[2][i] = a[3][i] = '+';
      break;
    }
  if (flag) {
    cout << "YES" << endl;
    for (int i = 1; i <= n; i++)
      cout << a[0][i] << a[1][i] << "|" << a[2][i] << a[3][i] << endl;
  } else
    cout << "NO" << endl;
  return 0;
}
