#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  bool temp = false;
  cin >> n;
  string *arr = new string[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  for (int i = 0; i < n; i++) {
    if (arr[i][0] == 'O' && arr[i][1] == 'O') {
      temp = true;
      cout << "YES" << endl;
      arr[i][0] = '+';
      arr[i][1] = '+';
      for (int i = 0; i < n; i++) cout << arr[i] << endl;
      break;
    }
    if (arr[i][3] == 'O' && arr[i][4] == 'O') {
      temp = true;
      cout << "YES" << endl;
      arr[i][3] = '+';
      arr[i][4] = '+';
      for (int i = 0; i < n; i++) cout << arr[i] << endl;
      break;
    }
  }
  if (temp == false) {
    cout << "NO" << endl;
  }
  return 0;
}
